-
Notifications
You must be signed in to change notification settings - Fork 881
chore: add prebuilds system user #16916
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
Merged
Merged
+591
−143
Conversation
This file contains hidden or 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
dannykopping
commented
Mar 13, 2025
SasSwart
reviewed
Mar 14, 2025
Looks okay to me |
Signed-off-by: Danny Kopping <[email protected]>
Signed-off-by: Danny Kopping <[email protected]>
Signed-off-by: Danny Kopping <[email protected]>
Signed-off-by: Danny Kopping <[email protected]>
appeasing linter Signed-off-by: Danny Kopping <[email protected]>
Signed-off-by: Danny Kopping <[email protected]>
Signed-off-by: Danny Kopping <[email protected]>
c92fb1b
to
e7e9c27
Compare
12 tasks
Signed-off-by: Danny Kopping <[email protected]>
dannykopping
commented
Mar 17, 2025
Emyrk
reviewed
Mar 17, 2025
spikecurtis
reviewed
Mar 18, 2025
SasSwart
added a commit
that referenced
this pull request
Mar 18, 2025
When trying to add [system users](#16916), we discovered an issue in two migrations that added values to the login_type enum. After some [consideration](#16916 (comment)), we decided to retroactively correct them.
EdwardAngert
pushed a commit
that referenced
this pull request
Mar 18, 2025
When trying to add [system users](#16916), we discovered an issue in two migrations that added values to the login_type enum. After some [consideration](#16916 (comment)), we decided to retroactively correct them.
johnstcn
reviewed
Mar 24, 2025
johnstcn
reviewed
Mar 25, 2025
johnstcn
reviewed
Mar 25, 2025
johnstcn
approved these changes
Mar 25, 2025
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pre-requisite for #16891
Closes coder/internal#515
This PR introduces a new concept of a "system" user.
Our data model requires that all workspaces have an owner (a
users
relation), and prebuilds is a feature that will spin up workspaces to be claimed later by actual users - and thus needs to own the workspaces in the interim.Naturally, introducing a change like this touches a few aspects around the codebase and we've taken the approach default hidden here; in other words, queries for users will by default exclude all system users, but there is a flag to ensure they can be displayed. This keeps the changeset relatively small.
This user has minimal permissions (it's equivalent to a
member
since it has no roles). It will be associated with the default org in the initial migration, and thereafter we'll need to somehow ensure its membership aligns with templates (which are org-scoped) for which it'll need to provision prebuilds; that's a solution we'll have in a subsequent PR.