Add Pass User Identities entry to "User Preferences" table
What does this MR do and why?
This MR creates a new entry in the User preferences
table. This entry pass_user_identities_to_ci_jwt
will eventually be toggled via API to include the entire list of the user's external identities in the JWT information sent to the job.
See the relevant issue here: #387537 (closed)
Title | Status |
---|---|
Add toggle for enabling user_identities to database/models |
![]() |
Add user_identities field to JwtV2
|
|
Add API for changing the toggle | |
Document the new field |
Screenshots or screen recordings
No UI changes are needed.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- [] I have evaluated the MR acceptance checklist for this MR.
Merge request reports
Activity
Hey @joe-snyder!
Thank you for your contribution to GitLab. Please refer to the contribution flow documentation for a quick overview of the process, and the merge request (MR) guidelines for the detailed process.
When you're ready for a first review, post
@gitlab-bot ready
. If you know a relevant reviewer(s) (for example, someone that was involved in a related issue), you can also assign them directly with@gitlab-bot ready @user1 @user2
.At any time, if you need help, feel free to post
@gitlab-bot help
or initiate a mentor session on Discord. Read more on how to get help.To enable automated checks on your MR, please configure Danger for your fork.
You can comment
@gitlab-bot label <label1> <label2>
to add labels to your MR. Please see the list of allowed labels in thelabel
command documentation.This message was generated automatically. You're welcome to improve it.
added Community contribution workflowin dev labels
assigned to @joe-snyder
added workflowready for review label and removed workflowin dev label
requested review from @avielle and @dhershkovitch
@avielle
@dhershkovitch
, this Community contribution is ready for review.- Do you have capacity and domain expertise to review this? We are mindful of your time, so if you are not able to take this on, please re-assign to one or more other reviewers.
- Add the workflowin dev label if the merge request needs action from the author. This message was generated automatically. You're welcome to improve it.
mentioned in issue gitlab-org/quality/triage-reports#10748 (closed)
added GitLab Ultimate label
added database label
- Resolved by Furkan Ayhan
@joe-snyder thanks for this work! LGTM
@furkanayhan could you please do the backend maintainer review?
Since this MR includes a DB migration, we also need a DB reviewer. @Andysoiron could you please do a database review for this MR?
requested review from @Andysoiron and @furkanayhan and removed review request for @avielle
- Resolved by Furkan Ayhan
@avielle
, thanks for approving this merge request.This is the first time the merge request is approved. To ensure full test coverage, please start a new pipeline before merging.
For more info, please refer to the following links:
added pipeline:mr-approved label
- A deleted user
added databasereview pending label
2 Warnings featureaddition and featureenhancement merge requests normally have a documentation change. Consider adding a documentation update or confirming the documentation plan with the Technical Writer counterpart.
For more information, see:
- The Handbook page on merge request types.
- The definition of done documentation.
There were no new or modified feature flag YAML files detected in this MR. If the changes here are already controlled under an existing feature flag, please add
the feature flagexists. Otherwise, if you think the changes here don't need
to be under a feature flag, please add the label feature flagskipped, and
add a short comment about why we skipped the feature flag.For guidance on when to use a feature flag, please see the documentation.
Reviewer roulette
Changes that require review have been detected!
Please refer to the table below for assigning reviewers and maintainers suggested by Danger in the specified category:
Category Reviewer Maintainer backend Hitesh Raghuvanshi (
@hraghuvanshi
) (UTC+5.5)Matthias Käppler (
@mkaeppler
) (UTC+2)database Jon Jenkins (
@jon_jenkins
) (UTC-5)Steve Abrams (
@sabrams
) (UTC-6)~"migration" No reviewer available No maintainer available To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot, based on their timezone. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines. Please consider assigning a reviewer or maintainer who is a domain expert in the area of the merge request.
Once you've decided who will review this merge request, assign them as a reviewer! Danger does not automatically notify them for you.
If needed, you can retry the
danger-review
job that generated this comment.Generated by
Dangerchanged milestone to %15.8
Database migrations (on the main database)
Migrations included in this change have been executed on gitlab.com data for testing purposes. For details, please see the migration testing pipeline (limited access).
Migration Type Total runtime Result DB size change 20230109161654 - AddIdentityToggleToApplicationSettings Regular 1.9 s +0.00 B Runtime Histogram for all migrations
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 2 0.1 seconds - 1 second 0 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0 Migration: 20230109161654 - AddIdentityToggleToApplicationSettings
- Type: Regular
- Duration: 1.9 s
- Database size change: +0.00 B
Calls Total Time Max Time Mean Time Rows Query 1 21.7 ms 21.7 ms 21.7 ms 0 ALTER TABLE "application_settings" ADD "ci_pass_user_identities" boolean DEFAULT FALSE NOT NULL /*application:test,db_config_name:main,line:/db/migrate/20230109161654_add_identity_toggle_to_application_settings.rb:5:in `change'*/
1 0.0 ms 0.0 ms 0.0 ms 1 SELECT $1::regtype::oid
Histogram for AddIdentityToggleToApplicationSettings
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 2 0.1 seconds - 1 second 0 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0
Background migrations
Other migrations pending on GitLab.com
Migration Type Total runtime Result DB size change Clone Details
Clone ID Clone Created At Clone Data Timestamp Expected Removal Time database-testing-1659942-8960265-main
2023-01-11T10:21:11Z 2023-01-11T08:11:00Z 2023-01-11 22:25:33 +0000 database-testing-1659942-8960265-ci
2023-01-11T10:21:11Z 2023-01-11T08:46:50Z 2023-01-11 22:25:33 +0000 Artifacts
Brought to you by gitlab-org/database-team/gitlab-com-database-testing. Epic
Database migrations (on the ci database)
Migrations included in this change have been executed on gitlab.com data for testing purposes. For details, please see the migration testing pipeline (limited access).
Migration Type Total runtime Result DB size change 20230109161654 - AddIdentityToggleToApplicationSettings Regular 2.2 s +0.00 B Runtime Histogram for all migrations
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 2 0.1 seconds - 1 second 0 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0 Migration: 20230109161654 - AddIdentityToggleToApplicationSettings
- Type: Regular
- Duration: 2.2 s
- Database size change: +0.00 B
Calls Total Time Max Time Mean Time Rows Query 1 49.7 ms 49.7 ms 49.7 ms 0 ALTER TABLE "application_settings" ADD "ci_pass_user_identities" boolean DEFAULT FALSE NOT NULL /*application:test,db_config_name:ci,line:/db/migrate/20230109161654_add_identity_toggle_to_application_settings.rb:5:in `change'*/
1 0.0 ms 0.0 ms 0.0 ms 1 SELECT $1::regtype::oid
Histogram for AddIdentityToggleToApplicationSettings
Query Runtime Count 0 seconds - 0.01 seconds 0 0.01 seconds - 0.1 seconds 2 0.1 seconds - 1 second 0 1 second - 5 seconds 0 5 seconds - 15 seconds 0 15 seconds - 5 minutes 0 5 minutes + 0
Background migrations
Other migrations pending on GitLab.com
Migration Type Total runtime Result DB size change Clone Details
Clone ID Clone Created At Clone Data Timestamp Expected Removal Time database-testing-1659942-8960265-main
2023-01-11T10:21:11Z 2023-01-11T08:11:00Z 2023-01-11 22:25:33 +0000 database-testing-1659942-8960265-ci
2023-01-11T10:21:11Z 2023-01-11T08:46:50Z 2023-01-11 22:25:33 +0000 Artifacts
Brought to you by gitlab-org/database-team/gitlab-com-database-testing. Epic
- A deleted user
added database-testing-automation label
added databasereviewed label and removed databasereview pending label
requested review from @DylanGriffith and removed review request for @Andysoiron
mentioned in issue #387537 (closed)
- Resolved by Joe Snyder
@joe-snyder I think the migration code looks safe to me but I still have questions about what this functionality was for and I was struggling to track them down in the issue #387537 (closed) . I also left minor feedback on the model.
removed review request for @DylanGriffith
added 539 commits
-
3acd1aa6...fdd5278c - 538 commits from branch
gitlab-org:master
- d76c9278 - Add User identities toggle to application settings
-
3acd1aa6...fdd5278c - 538 commits from branch
mentioned in merge request !108843 (closed)
removed review request for @furkanayhan
added 1969 commits
-
d76c9278...521de83a - 1967 commits from branch
gitlab-org:master
- 7f66b8c4 - Add User identities toggle to application settings
- 4f091122 - Add settings documentation for User Identities
-
d76c9278...521de83a - 1967 commits from branch
- Resolved by Joe Snyder
requested review from @marcel.amirault
@joe-snyder Thanks for adding the docs! I have a small copy edit suggestion, but otherwise LGTM!
added Technical Writing docsfeature documentation labels
removed review request for @marcel.amirault
added 345 commits
-
4f091122...60404958 - 343 commits from branch
gitlab-org:master
- e70714ac - Add User identities toggle to application settings
- 88341c3e - Add settings documentation for User Identities
-
4f091122...60404958 - 343 commits from branch
added 852 commits
-
88341c3e...2522ab28 - 850 commits from branch
gitlab-org:master
- fd0a0fa4 - Add User identities toggle to application settings
- a66ff490 - Add settings documentation for User Identities
-
88341c3e...2522ab28 - 850 commits from branch
requested review from @furkanayhan
added 531 commits
-
a66ff490...8ef59685 - 529 commits from branch
gitlab-org:master
- 47b7dec1 - Add User identities toggle to application settings
- 3d26ef62 - Add settings documentation for User Identities
-
a66ff490...8ef59685 - 529 commits from branch
added 1268 commits
-
3d26ef62...5bc274dd - 1266 commits from branch
gitlab-org:master
- 849d8eb0 - Add User identities toggle to application settings
- be9f04af - Add settings documentation for User Identities
-
3d26ef62...5bc274dd - 1266 commits from branch
added 146 commits
-
be9f04af...323c0bd7 - 144 commits from branch
gitlab-org:master
- 694b502c - Add User identities toggle to application settings
- f5c4952f - Add settings documentation for User Identities
-
be9f04af...323c0bd7 - 144 commits from branch
removed review request for @furkanayhan
added 1118 commits
-
f5c4952f...81b1de5e - 1117 commits from branch
gitlab-org:master
- 37345c58 - Add User identities toggle to User Preferences
-
f5c4952f...81b1de5e - 1117 commits from branch