Skip to content

test(codersdk/toolsdk): fix TestTools/WorkspaceExecute workdir check on Windows - #32323

Merged
f0ssel merged 1 commit into
mainfrom
fix/toolsworkspaceexecute-flake
Nov 17, 2026
Merged

f0ssel merged 1 commit into
mainfrom
fix/toolsworkspaceexecute-flake

Conversation

@f0ssel

@f0ssel f0ssel commented Nov 17, 2026

Copy link
Copy Markdown
Member

Fixes CODAGT-1333.

TestTools/WorkspaceExecute failed on Windows with GetFileAttributesEx /tmp: The system cannot find the file specified. The agent runs commands via sh -c on every platform (agent/agentproc/process.go), which is Git Bash/MSYS on Windows runners. There pwd prints a POSIX path like /tmp/..., and filepath.EvalSymlinks cannot resolve it. The command itself ran in the right directory; the assertion was wrong.

The test now runs touch marker.txt in the requested workdir and asserts the file exists at filepath.Join(workDir, "marker.txt") on the host. This is the same approach agent/agentproc CustomWorkDir already uses for this reason. No timeouts changed.


Generated by Coder Agents on behalf of @f0ssel.

@f0ssel
f0ssel temporarily deployed to main November 17, 2026 14:30 — with GitHub Actions Inactive
@f0ssel
f0ssel temporarily deployed to main November 17, 2026 14:30 — with GitHub Actions Inactive
@linear-code

linear-code Bot commented Nov 17, 2026

Copy link
Copy Markdown

CODAGT-1333

@mafredri mafredri left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I guess this was incorrectly identified as a flake? Looks like it was just utterly broken lol.

@f0ssel
f0ssel merged commit 7394a66 into main Nov 17, 2026
51 checks passed
@f0ssel
f0ssel deleted the fix/toolsworkspaceexecute-flake branch November 17, 2026 14:50
@f0ssel
f0ssel temporarily deployed to main November 17, 2026 14:50 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 17, 2026

This branch had an error being deployed

1 failed and 1 inactive deployments
main — 2cf00b54 Deployed Nov 17, 2026 by f0ssel via cla #258705
docs-preview — 2cf00b54 Deployed Nov 17, 2026 by f0ssel via cleanup #166
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants