-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: store project-group association in api instead of keycloak #3612
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Dec 4, 2023
shreddedbacon
force-pushed
the
project-groups-db-cache
branch
from
December 5, 2023 22:42
2eb3a04
to
33d3e80
Compare
shreddedbacon
force-pushed
the
project-groups-db-cache
branch
from
December 6, 2023 00:06
33d3e80
to
2835fb4
Compare
shreddedbacon
changed the title
refactor: use apidb to store project-group and org-group association
refactor: store project-group association in api instead of keycloak
Dec 6, 2023
rocketeerbkw
requested changes
Mar 7, 2024
services/api/database/migrations/20240117000000_group_projects.js
Outdated
Show resolved
Hide resolved
services/api/database/migrations/20240117000000_group_projects.js
Outdated
Show resolved
Hide resolved
services/api/src/migrations/lagoon/migrations/20231130000000_group_projects.ts
Outdated
Show resolved
Hide resolved
shreddedbacon
force-pushed
the
project-groups-db-cache
branch
from
March 8, 2024 00:31
61325ea
to
d121d35
Compare
rocketeerbkw
approved these changes
Mar 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will work as a middle ground while we continue to explore options for all group data.
smlx
added a commit
to uselagoon/lagoon-opensearch-sync
that referenced
this pull request
Apr 19, 2024
The lagoon-projects attribute is deprecated as of Lagoon v2.18. See uselagoon/lagoon#3612 for details.
smlx
added a commit
to uselagoon/lagoon-opensearch-sync
that referenced
this pull request
Apr 19, 2024
The lagoon-projects attribute is deprecated as of Lagoon v2.18. See uselagoon/lagoon#3612 for details.
smlx
added a commit
to uselagoon/lagoon-opensearch-sync
that referenced
this pull request
May 6, 2024
The lagoon-projects attribute is deprecated as of Lagoon v2.18. See uselagoon/lagoon#3612 for details.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
General Checklist
Database Migrations
This changes the way that project ids are stored against groups. It currently retains the function of adding the attributes in keycloak still for backwards compatibility with tools that use these attributes, but with a plan to remove this functionality once the other tools can be updated to use the project ids from the api-db.
The big changes are
Considerations
lagoon-projects
attribute on groups would need remain, at least for a period of time, as there are other systems that use these that would need to be refactored. While these other systems/tools use this attribute though, when a group is added/removed to a project, there is the potential due to the non-atomic nature of a lot of requests in Lagoon, that keycloak may not receive the attribute update, but the api-db does, or vice versa. This would result in incorrect access in either api or the other tools depending on the failure point. This not-atomic nature exists now, so this out of sync condition can and already does occur at times.