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: handle vscodessh style workspace names in coder ssh#17154

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
f0ssel merged 1 commit intomainfromf0ssel/ssh-workspace-name
Apr 7, 2025

Conversation

f0ssel
Copy link
Contributor

Fixes an issue where old ssh configs that use theowner--workspace--agent format will fail to properly use thecoder ssh command since we migrated off thecoder vscodessh command.

@f0sself0sselforce-pushed thef0ssel/ssh-workspace-name branch from9680d52 to0154e6cCompareMarch 28, 2025 16:03
Copy link
Member

@ParkreinerParkreiner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Changes look straightforward to me. Mainly had questions about the regex pattern

@@ -57,6 +58,7 @@ var (
autostopNotifyCountdown = []time.Duration{30 * time.Minute}
// gracefulShutdownTimeout is the timeout, per item in the stack of things to close
gracefulShutdownTimeout = 2 * time.Second
workspaceNameRe = regexp.MustCompile(`[/.]+|--`)
Copy link
Member

@ParkreinerParkreinerMar 28, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I feel like we can make this Regex more specific to avoid false positives. I don't know if Go's version requires you to escape the. and/, but I'm worried the. is getting interpreted as a wildcard and not a literal period

I think we could go with something like\/|\.|--, which treats the. case,/ case, and-- case as distinct. At least from the test inputs, I didn't see any cases where the dots and slashes could be joined together as a single pattern, which is what the current regex allows

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

. is not interpreted as a wildcard inside[].

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ah, that's right – forgot that regex classes stop that behavior

@f0sself0ssel merged commitfc471eb intomainApr 7, 2025
29 checks passed
@f0sself0ssel deleted the f0ssel/ssh-workspace-name branchApril 7, 2025 14:07
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsApr 7, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@aaronlehmannaaronlehmannaaronlehmann left review comments

@ParkreinerParkreinerParkreiner approved these changes

@bcpeinhardtbcpeinhardtAwaiting requested review from bcpeinhardt

Assignees

@f0sself0ssel

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@f0ssel@aaronlehmann@Parkreiner

[8]ページ先頭

©2009-2025 Movatter.jp