Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: create directory before writing coder connect network info file #17628

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

Merged
merged 1 commit into from
May 1, 2025

Conversation

ethanndickson
Copy link
Member

@ethanndickson ethanndickson commented May 1, 2025

The regular network info file creation code also calls Mkdirall.

Wasn't picked up in manual testing as I already had the /net folder in my VSCode.

Wasn't picked up in automated testing because we use an in-memory FS, which for some reason does this implicitly:

func (m *MemMapFs) registerWithParent(f *mem.FileData, perm os.FileMode) {
	if f == nil {
		return
	}
	parent := m.findParent(f)
	if parent == nil {
		pdir := filepath.Dir(filepath.Clean(f.Name()))
		err := m.lockfreeMkdir(pdir, perm)
[...]

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ethanndickson ethanndickson changed the title fix(cli/ssh): mkdirall before writing coder connect network info file fix(cli): mkdirall before writing coder connect network info file May 1, 2025
@ethanndickson ethanndickson changed the title fix(cli): mkdirall before writing coder connect network info file fix: mkdirall before writing coder connect network info file May 1, 2025
@ethanndickson ethanndickson changed the title fix: mkdirall before writing coder connect network info file fix: create directory before writing coder connect network info file May 1, 2025
@ethanndickson ethanndickson added the hotfix PRs only. Harmless small change. Only humans may set this. label May 1, 2025
@ethanndickson ethanndickson marked this pull request as ready for review May 1, 2025 06:31
Copy link

@cdr-bot cdr-bot bot left a comment

Choose a reason for hiding this comment

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

This PR is a hotfix and has been automatically approved.

  • ✅ Base is main or release branch
  • ✅ Has hotfix label
  • ✅ Head is from coder/coder
  • ✅ Less than 100 lines

@ethanndickson ethanndickson enabled auto-merge (squash) May 1, 2025 06:31
@ethanndickson ethanndickson disabled auto-merge May 1, 2025 06:45
@ethanndickson ethanndickson merged commit c7fc7b9 into main May 1, 2025
55 checks passed
@ethanndickson ethanndickson deleted the ethan/mkdir-all-coder-connect-ssh branch May 1, 2025 06:53
@github-actions github-actions bot locked and limited conversation to collaborators May 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
hotfix PRs only. Harmless small change. Only humans may set this.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant