CI's SWIFT_BACKTRACE setting breaks tests that read stderr

Open Beginner friendly
#718 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
github-actions, swift
Domain
ci-cd, testing

Research direction

Read .github/workflows/test.yml and check where SWIFT_BACKTRACE is set in the test job. Remove it from the job environment or scope it to the step that needs it, as the issue suggests. Confirm the affected stderr-reading tests pass in CI, including the remote-host tests, docket test, and RemoteHookTests stubs.

Written by the indexing model from the issue text.

Description

#711 set SWIFT_BACKTRACE: enable=yes in .github/workflows/test.yml. On the CI runners every Swift executable then prints swift runtime: backtrace-on-crash is not supported for privileged executables. on stderr, and tests that read a tool's stderr fail.

On #709's run at 38dec607 (run 47420475078), with #715's warning fix in place, swift-test (1) and (3) failed this way:

  • About 20 remote-host tests in PauseTests, RemoteCardTests, RemoteRemovalTests, RemoteCleanupTests, RemoteCLITests, RemoteHookTests, and RemoteLinkGuardTests time out with "timed out waiting for mini's link to be unreachable with the refusal".
  • DocketTests.aBrokenDocketPutsTheRowInNeedsYouUntilAPollSucceeds sees "can't read docket: docket exited: swift runtime: backtrace-on-crash …" as the reason.
  • RemoteHookTests stub tests find that message in stderr where they expect it empty or exact.

The same tests pass locally in a few seconds. Main's own runs stop earlier, at the warning check that #715 fixes, so main hasn't shown this failure yet.

Removing SWIFT_BACKTRACE from the test job's env, or setting it only for the step that needs it, should fix this.

Dominant language
Swift
Stars
0
Forks
1
Avg merge
12h 28m
Merged PRs (30d)
414

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from haacked/switchboard

All issues in haacked/switchboard

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.