Repository navigation
Run ci-job-timings on macOS bash 3.2 - #39
Merged
Merged
Conversation
`declare -A` needs bash 4. macOS ships bash 3.2.57 and `/usr/bin/env bash`
resolves to it, so the script aborted before doing any work:
./ci-job-timings: line 124: declare: -A: invalid option
That made the tool unrunnable on the machine it is most often run from,
while `ci-pr-latency` and `ci-runner-audit` next to it worked fine.
The associative array only mapped a run id to its workflow path. A
tab-separated temp file and an `awk` lookup do the same job and run
anywhere. The temp file joins the existing `trap` cleanup.
No behaviour change: same grouping, same output, same `--json` shape.
|
Warning Review limit reachedNext included review available in 16 minutes. View limit detailsLimit details: You’ve used all 5 included reviews currently available. Your 52 included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 file)
Reviewed by free · Input: 28.7K · Output: 8.1K · Cached: 90.6K |
This was referenced Sep 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The problem
ci-job-timingsdoes not run on macOS. It aborts before doing any work:declare -Aneeds bash 4. macOS ships bash 3.2.57, and/usr/bin/env bashresolves to it. So the tool was unrunnable on the machine it is most often run from, whileci-pr-latencyandci-runner-auditsitting next to it worked fine.I hit this while taking a CI baseline across the private repos and had to reimplement the same aggregation by hand.
The fix
The associative array only mapped a run id to its workflow path, so that two workflows both defining a job called
testdo not collapse into one row. A tab-separated temp file plus anawklookup does the same job and runs anywhere. The temp file joins the existingtrapcleanup.No behaviour change: same grouping, same output, same
--jsonshape.Verified
Both output modes, against two real repos, on bash 3.2.57:
--jsonemits the same schema as before.