-
Notifications
You must be signed in to change notification settings - Fork 12
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
ID-1369 Repair cloud access followup, increment group version #1530
ID-1369 Repair cloud access followup, increment group version #1530
Conversation
_ <- cloudExtensions.onUserEnable(user, samRequestContext) | ||
// if the user is already created and enabled, then recover and just add them to the groups they should be in | ||
_ <- cloudExtensions.onUserCreate(user, samRequestContext).recover({ case _ => () }) | ||
_ <- cloudExtensions.onUserEnable(user, samRequestContext).recover({ case _ => () }) |
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.
I just added a wildcard recover to these to make this whole call fully idempotent i.e. running it multiple times on the same user should have the same end effect and not error out if their proxy group is already there etc.
groups <- directoryDAO.listUserDirectMemberships(user.id, samRequestContext) | ||
_ = groups.map(g => directoryDAO.updateGroupUpdatedDateAndVersionWithSession(g, samRequestContext)) |
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.
This increments all the group versions so that the group sync messages dont get deduped
|
||
// get group from db | ||
val groupWithUpdatedVersion = runAndWait(dirDAO.loadGroup(group.id, samRequestContext)) | ||
groupWithUpdatedVersion.get.version shouldBe group.version + 1 |
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.
the important assertion
d83edc0
to
fd477b9
Compare
Quality Gate passedIssues Measures |
@Ghost-in-a-Jar looks like |
Ticket: https://broadworkbench.atlassian.net/browse/ID-1369
Creation of the proxy group works, but adding the proxy to the groups it should be in doesnt because we need to increment those group versions so that the sync messages dont get deduped.
PR checklist