ROX-11070: Add migration for groups bucket.#2066
Conversation
|
Skipping CI for Draft Pull Request. |
|
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
0bf669d to
7663a59
Compare
|
Tag for build #730863 is 💻 For deploying this image using the dev scripts, run the following first: export MAIN_IMAGE_TAG='3.70.x-572-gdee1f4b9a3'🕹️ A |
7663a59 to
4efd782
Compare
7239011 to
f4894c6
Compare
4efd782 to
42dce65
Compare
98627b2 to
d71d74b
Compare
42dce65 to
d5f91cc
Compare
d71d74b to
bfbce16
Compare
d5f91cc to
20da2d4
Compare
|
/test all |
cf7339b to
9984d29
Compare
437d113 to
9381fe0
Compare
9984d29 to
b33646c
Compare
rukletsov
left a comment
There was a problem hiding this comment.
I have one question but beyond that this is beautiful. Thanks for timely addressing my feedback.
9381fe0 to
666fb17
Compare
9d640bb to
de1901d
Compare
666fb17 to
7db4450
Compare
a08a85d to
9f3e942
Compare
…. Ensure the migration does not fail if the bucket does not exist.
9f3e942 to
dee1f4b
Compare
|
Images are ready for the commit at dee1f4b. To use with deploy scripts, first |
|
@dhaus67: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
The CI failure is also occurring in the nightlies, I'll go ahead and merge this one for now. |

Description
This is the fourth PR in a series of PRs regarding removing the composite key from the groups datastore, allowing users to specify different roles for the same group properties.
For full context, you can navigate to the previous PRs by using the comment created below.
This PR will create a migration for the
groupsbucket, adding a ID to all groups which don't have one associated with them as well as using the ID as the new key within the bucket instead of the composite key.Testing Performed
Manual testing:
curl -X POST https://<endpoint>/v1/groupsbatch -H "Authorization: Bearer <token>" -d ‘{"previous_groups":[{"props":{"authProviderId”:”<auth-provider-id>”},”roleName":"Admin"}],"required_groups":[{"props":{"authProviderId":"<auth-provider-id>","key":"name","value":"someday"},"roleName":"None"},{"props":{"authProviderId":"<auth-provider-id>","key":"name","value":"someway"},"roleName":"Scope Manager"},{"props":{"authProviderId":"<auth-provider-id>","key":"email","value":"someone"},"roleName":"Vulnerability Management Requester"},{"props":{"authProviderId":"<auth-provider-id>","key":"email","value":"somewhen"},"roleName":"Admin"},{"props":{"authProviderId":"<auth-provider-id>","key":"email","value":"something"},"roleName":"Vulnerability Report Creator"},{"props":{"authProviderId":"<auth-provider-id>","key":"groups","value":"somehow"},"roleName":"Vulnerability Management Approver"},{"props":{"authProviderId":"<auth-provider-id>","key":"groups","value":"somewhere"},"roleName":"Sensor Creator"},{"props":{"authProviderId":"<auth-provider-id>","key":"userid","value":"someday"},"roleName":"None"},{"props":{"authProviderId":"<auth-provider-id>","key":"userid","value":"sometime"},"roleName":"Continuous Integration"},{"props":{"authProviderId":"<auth-provider-id>","key":"userid","value":"somewhat"},"roleName":"Analyst"},{"props":{"authProviderId":"<auth-provider-id>"},"roleName":"Admin"}]}’curl https://dh0701wildlimittype.demo.stackrox.com/v1/groups -H "Authorization: Bearer <token>"106: