Skip to content

fix(gateway): handle windows web locks and stabilize tailscale checks - #1498

Merged
nixuuu merged 1 commit into
devfrom
test/tailscale-launch-timeout
Nov 30, 2026
Merged

nixuuu merged 1 commit into
devfrom
test/tailscale-launch-timeout

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 30, 2026

Copy link
Copy Markdown
Member

Fixes #1493.

  • The Windows standalone gateway exited before binding its HTTP port when the filesystem denied the rename of the extracted web directory with EPERM. Retry the atomic rename with bounded backoff for Windows sharing and access errors. Reuse a completed release from a concurrent publisher and clean up only this process's staging directory. First Windows attempt
  • The Intel macOS runner located the Tailscale bundle CLI, then hit the success fixture's three-second command deadline. Give that fixture 30 seconds for a cold launch and another five for setup and cleanup. It still runs the real child with an empty PATH and checks CLI mode, arguments and status. The separate deadline test keeps its two-second command budget. First Intel macOS attempt

Verification

  • On Linux, the compiled embedded-web fixture passed startup, self-update, old asset retrieval and rollback.
  • An isolated fault-injection check exercised release preparation with a transient Windows rename denial, a competing publisher, a persistent lock, an unrelated I/O error and a POSIX permission error. It verified the published contents or the propagated error, the retry bounds and staging cleanup.
  • All four Tailscale integration tests passed on Linux with a four-second delay injected into the first fixture launch. check:tmp found no leftover test directories. Focused lint and formatting checks passed.
  • PR CI exercises the bundle CLI on native macOS runners and starts the compiled gateway on Windows.

@nixuuu
nixuuu enabled auto-merge (squash) November 30, 2026 07:36
@nixuuu
nixuuu merged commit 1d671fa into dev Nov 30, 2026
24 checks passed
@nixuuu
nixuuu deleted the test/tailscale-launch-timeout branch November 30, 2026 07:41
nixuuu added a commit that referenced this pull request Nov 30, 2026
Follow-up to #1498 and #1493.

When publication and staging cleanup both failed, the cleanup exception
escaped from `finally` and hid the filesystem error that prevented
startup. The gateway now returns the publication error and logs the
cleanup failure with the staging path. Cleanup starts only after this
process creates its staging directory.

The regression test blocks the real directory rename and injects a
cleanup failure scoped to that extraction. It failed on the merged
revision with the cleanup error and passes with the fix.

## Verification

- All six embedded-web integration tests passed locally on Linux through
`check:tmp`. No temp directories were left behind.
- An isolated Windows fault-injection check covered transient and
persistent rename `EPERM` and a persistent `EPERM` combined with cleanup
`EBUSY`. Publication succeeded on attempt two for the transient error.
Both persistent cases returned the error from the seventh rename.
- Focused lint, formatting and diff checks passed. PR CI covers native
runs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky tests in Push CI

1 participant