-
Notifications
You must be signed in to change notification settings - Fork 914
fix!: enforce agent names be case-insensitive-unique per-workspace #16614
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
This stack of pull requests is managed by Graphite. Learn more about stacking. |
ea0c978
to
5241805
Compare
5241805
to
566e3de
Compare
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 had no idea this was allowed 🤯, nice find!
Should we add this guard on the provider as well? I'm thinking we can surface the error faster/better over there. I absolutely think it's worth guarding the input here as well, though.
Unfortunately not possible, since we derive the agent name from the name of the resource, which the provider SDK purposefully doesn't expose to us :( [1] i.e. for For the same reason, you can't use the |
…16614) Relates to coder/coder-desktop-macos#54 Currently, it's possible to have two agents within the same workspace whose names only differ in capitalization: This leads to an ambiguity in two cases: - For CoderVPN, we'd like to allow support to workspaces with a hostname of the form: `agent.workspace.username.coder`. - Workspace apps (`coder_app`s) currently use subdomains of the form: `<app>--<agent>--<workspace>--<username>(--<suffix>)?`. Of note is that DNS hosts must be strictly lower case, hence the ambiguity. This fix is technically a breaking change, but only for the incredibly rare use case where a user has: - A workspace with two agents - Those agent names differ only in capitalization. Those templates & workspaces will now fail to build. This can be fixed by choosing wholly unique names for the agents.
…16614) Relates to coder/coder-desktop-macos#54 Currently, it's possible to have two agents within the same workspace whose names only differ in capitalization: This leads to an ambiguity in two cases: - For CoderVPN, we'd like to allow support to workspaces with a hostname of the form: `agent.workspace.username.coder`. - Workspace apps (`coder_app`s) currently use subdomains of the form: `<app>--<agent>--<workspace>--<username>(--<suffix>)?`. Of note is that DNS hosts must be strictly lower case, hence the ambiguity. This fix is technically a breaking change, but only for the incredibly rare use case where a user has: - A workspace with two agents - Those agent names differ only in capitalization. Those templates & workspaces will now fail to build. This can be fixed by choosing wholly unique names for the agents.
Relates to coder/coder-desktop-macos#54
Currently, it's possible to have two agents within the same workspace whose names only differ in capitalization:
This leads to an ambiguity in two cases:
agent.workspace.username.coder
.coder_app
s) currently use subdomains of the form:<app>--<agent>--<workspace>--<username>(--<suffix>)?
.Of note is that DNS hosts must be strictly lower case, hence the ambiguity.
This fix is technically a breaking change, but only for the incredibly rare use case where a user has:
Those templates & workspaces will now fail to build. This can be fixed by choosing wholly unique names for the agents.