Skip to content

Add macOS runner to Go CI and optimize linter#486

Merged
F1bonacc1 merged 4 commits into
mainfrom
add-macos-runner-485-518654296387858214
May 17, 2026
Merged

Add macOS runner to Go CI and optimize linter#486
F1bonacc1 merged 4 commits into
mainfrom
add-macos-runner-485-518654296387858214

Conversation

@F1bonacc1
Copy link
Copy Markdown
Owner

This PR adds a macOS runner to the Go CI workflow as requested in issue #485. It also optimizes the workflow by ensuring that golangci-lint only runs on the ubuntu-latest runner, avoiding redundant linting on Windows and macOS.

Key changes:

  • Updated .github/workflows/go.yml matrix to include macos-latest.
  • Added a conditional if: matrix.os == 'ubuntu-latest' to the Run golangci-lint step.

PR created automatically by Jules for task 518654296387858214 started by @F1bonacc1

- Added `macos-latest` to the Go workflow matrix to catch macOS-specific regressions.
- Restricted `golangci-lint` to run only on `ubuntu-latest` to save CI resources.

Addresses: #485

Co-authored-by: F1bonacc1 <806740+F1bonacc1@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

F1bonacc1 and others added 3 commits May 17, 2026 22:03
ShutDownProject returns once child processes have exited, but each
process's stdout-reader goroutine is abandoned during shutdown
(process.go waitForStdOutErr → procRunCtx.Done) and may still be
flushing the bash trap output to the project log file. Reading the
file once after ShutDownProject is a race: on Linux the flush usually
beats the test; on macOS CI it doesn't, leaving the file empty and
failing the assertion.

Poll the file with a 5s deadline instead, breaking out as soon as the
expected exit order materializes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous fixture relied on a bash trap printing "X: exit" to
stdout when SIGTERM arrived, then read those lines back out of the
process-compose project log. That depended on three racy things that
all happen to line up on Linux but not on macOS CI:

  - bash having installed its trap and being parked in `sleep` by
    the time SIGTERM arrives at the process group;
  - the trap's stdout write reaching the pipe before process-compose's
    waitForStdOutErr abandons the drain via procRunCtx.Done; and
  - the per-process handleOutput goroutine reading those bytes before
    the pipe is closed (macOS surfaced "read |0: file already closed"
    errors and exit_code=-1 instead of 143 here).

Switch each process to use shutdown.command instead. shutdown.command
runs synchronously from doConfiguredStop, which is invoked in exactly
the order shutDownInOrder enforces, with no signal-delivery race and
no dependency on stdout pipe drain timing. Each command appends its
marker to $PC_TEST_SHUTDOWN_LOG (set per-run via t.Setenv to a
t.TempDir path) and then exits non-zero so process-compose SIGKILLs
the original `sleep 30`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@F1bonacc1 F1bonacc1 merged commit a4038d6 into main May 17, 2026
7 checks passed
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.

1 participant