Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged

Conversation

ethanndickson
Copy link
Member

@ethanndicksonethanndickson commentedFeb 19, 2025
edited
Loading

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:

  • For CoderVPN, we'd like to allow support to workspaces with a hostname of the form:agent.workspace.username.coder.
  • Workspace apps (coder_apps) 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.

@ethanndicksonGraphite App
Copy link
MemberAuthor

@ethanndicksonethanndicksonforce-pushed theethan/case-insensitive-unique-agent-names branch fromea0c978 to5241805CompareFebruary 19, 2025 05:30
@ethanndicksonethanndicksonforce-pushed theethan/case-insensitive-unique-agent-names branch from5241805 to566e3deCompareFebruary 19, 2025 05:50
@ethanndicksonethanndickson marked this pull request as ready for reviewFebruary 19, 2025 05:57
@ethanndicksonethanndickson added the release/breakingThis label is applied to PRs to detect breaking changes as part of the release process labelFeb 19, 2025
Copy link
Member

@mafredrimafredri left a 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
Copy link
MemberAuthor

ethanndickson commentedFeb 19, 2025
edited
Loading

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. forresource "coder_agent" "agent_name" there's no way in the provider Go code to readagent_name.

For the same reason,you can't use thefor_each meta-argument with agents.

mafredri reacted with confused emoji

@ethanndicksonGraphite App
Copy link
MemberAuthor

ethanndickson commentedFeb 20, 2025
edited
Loading

Merge activity

  • Feb 19, 8:51 PM EST: A user started a stack merge that includes this pull request viaGraphite.
  • Feb 19, 8:51 PM EST: A user merged this pull request withGraphite.

@ethanndicksonethanndickson merged commit3fddfef intomainFeb 20, 2025
45 checks passed
@ethanndicksonethanndickson deleted the ethan/case-insensitive-unique-agent-names branchFebruary 20, 2025 01:51
aslilac pushed a commit that referenced this pull requestFeb 21, 2025
…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.
aslilac pushed a commit that referenced this pull requestFeb 27, 2025
…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.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@mafredrimafredrimafredri approved these changes

@deansheatherdeansheatherdeansheather approved these changes

Assignees

@ethanndicksonethanndickson

Labels
release/breakingThis label is applied to PRs to detect breaking changes as part of the release process
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ethanndickson@mafredri@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp