- Notifications
You must be signed in to change notification settings - Fork913
chore: avoid depending on rbac in slim builds#17959
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
@@ -52,13 +39,21 @@ func (r *RootCmd) userEditRoles() *serpent.Command { | |||
if err != nil { | |||
return xerrors.Errorf("fetch user roles: %w", err) | |||
} | |||
siteRoles, err := client.ListSiteRoles(ctx) |
ethanndicksonMay 21, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 think making coderd the source of truth for site roles (and not whatever is embedded in the binary) is sensible here. There's a comment from a few years ago about moving the list of site roles to the database, so if that ever happens we'd need to switch to fetching them anyway.
EDIT: See below.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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 have been meaning to get around to this, 👍
52d65ee
to953816a
Compare34494fb
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
I noticed the
coder-vpn.dylib
(of course alongside the Agent/CLI binaries) had grown substantially (from 29MB to 37MB for the dylib), and discovered that importing RBAC in slim builds was the issueThis PR removes the dependency on RBAC in slim builds, and adds a compile-time check to ensure it can't be imported in the future:
Before and after for
coder-slim_darwin_arm64
: