-
Notifications
You must be signed in to change notification settings - Fork 889
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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) |
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.
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
to
953816a
Compare
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
: