- Notifications
You must be signed in to change notification settings - Fork914
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 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
This stack of pull requests is managed byGraphite. Learn more aboutstacking. |
ea0c978
to5241805
Compare5241805
to566e3de
CompareThere 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.
ethanndickson commentedFeb 19, 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.
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 |
ethanndickson commentedFeb 20, 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.
3fddfef
intomainUh oh!
There was an error while loading.Please reload this page.
…16614)Relates tocoder/coder-desktop-macos#54Currently, 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 tocoder/coder-desktop-macos#54Currently, 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.
Uh oh!
There was an error while loading.Please reload this page.
Relates tocoder/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.