Repository navigation
Make the vault and broker-api-k8s integration suites runnable on macOS - #7197
Merged
sorindumitru merged 2 commits intoAug 8, 2026
Merged
sorindumitru merged 2 commits into
sorindumitru merged 2 commits into
Conversation
macOS does not ship timeout at all, and BSD date has no -d, so both vault suites fail partway through a run on a macOS host. Replace the timeout wrapper with the bounded polling idiom already used by wait-for-rollout in the k8s suite. That reports a reason when the wait is exhausted, rather than dying at bare exit 124 under set -e. Note the bound is now a check count rather than wall-clock time, matching the k8s suite. Replace the date -d arithmetic with $(( $(date -u +%s) + 90 )). The loop it feeds already compares against date -u +%s, so both sides agree. No behaviour change on Linux. Signed-off-by: samuraiXwandering <[email protected]>
readarray is a bash 4+ builtin and macOS ships bash 3.2 as /bin/bash, so broker-api-k8s fails on a macOS host unless a newer bash is put on PATH. Unlike the vault changes this one has a workaround that needs no repo change, so it is kept as a separate commit and can be dropped. The existing [ -n ] guard below already tolerates the empty-element difference between the two forms. Signed-off-by: samuraiXwandering <[email protected]>
samuraixwandering
marked this pull request as ready for review
August 6, 2026 11:35
samuraixwandering
requested review from
MarcosDY,
amartinezfayo,
evan2645,
rturner3 and
sorindumitru
as code owners
August 6, 2026 11:35
sorindumitru
approved these changes
Aug 8, 2026
sorindumitru
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks @samuraixwandering!
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.
Pull Request check list
Affected functionality
The
key-manager-vault,upstream-authority-vaultandbroker-api-k8sintegration suites. No production code is touched and there is no behaviour change on Linux.Description of change
These suites cannot run on a macOS host without installing GNU replacements first. CI only runs them on
ubuntu-22.04, so the gap is invisible there.timeout 30s bash -c '...'in both vault suites becomes the bounded polling idiomwait-for-rolloutalready uses ink8s/01-apply-config, since macOS does not shiptimeout. One deliberate difference: the budget is a check count now rather than wall-clock time, matching that suite, and it callsfail-nowwith a reason instead of dying at bare exit 124 underset -e.date -ud "1 minute 30 second" +%sbecomes$(( $(date -u +%s) + 90 )), since BSDdatehas no-d. Line 10 of the same script already compares againstdate -u +%s, so both sides agree.readarraybecomes awhile IFS= read -rloop, since it is a bash 4+ builtin and macOS ships bash 3.2 as/bin/bash. Kept as a separate commit: unlike the other two it has a workaround needing no repo change, so it is easy to drop if you would rather leavebroker-api-k8salone.Verification
Run on Darwin 25.6.0 arm64 with
PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin, which carries no GNU tools. Gated before running:bashis 3.2.57,timeoutis absent,date -dis rejected,readarrayis unavailable.On unmodified main (
6215e5995) the reported failure reproduces, after the kind cluster comes up healthy:On this branch, same host and same PATH:
upstream-authority-vaultkey-manager-vaultbroker-api-k8sThe changed paths are exercised rather than skipped. The poll loop obtains a real certificate from k8s,
04-verify-token-renewal.shruns a real deadline loop and reportstoken renewal is verified, andbroker-api-k8scomes up as a three node cluster so the read loop parses three distinct node UIDs.Which issue this PR fixes
fixes #7174