ci: load every plugin before shipping it, and report where the test time goes - #2361
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Two things CI never did: try to load a plugin it built, and say how long anything took.
Nothing ever loaded a plugin
CI built and signed 31 plugin bundles and never once tried to load one. "Bundle failed to load executable" is the failure this repo has shipped twice, both times because a witness table hard-referenced a PluginKit symbol that had been removed, and both times the first thing to find out was a user's install.
scripts/ci/verify-plugin-loads.shdlopens each bundle's executable, which is exactly the dyld path that fails in that case. It takes milliseconds.It runs in two places: the
buildjob ofmacos-tests.ymlright afterAllPluginscompiles all 31, so every pull request checks them, and inbuild-plugin.ymlbefore a bundle is published, because the registry serves those to users directly.Verified against a real build. All 14 bundled plugins load:
And it fails when one cannot. Corrupting a single executable:
dlerrorprints every path it tried, which is a screenful, so the message keeps the reason and the distinct causes and drops the list. An empty directory is a failure too, not a silent pass, because "found nothing, therefore fine" is how a check like this stops working.The plugins need
DYLD_FRAMEWORK_PATHpointing at the products directory to resolveTableProPluginKit; without it every plugin would fail for the wrong reason.Nothing measured how long tests take
grep -rn GITHUB_STEP_SUMMARYfound nothing in the repo. Both.xcresultbundles were uploaded as artifacts and never read, so finding out which of 85 UI tests took ninety seconds meant downloading one and opening Xcode.That is why a ten second XCUITest retry sat in every sample-database test, 30% of the UI job, until somebody went looking for it.
scripts/ci/summarize-xcresult.shwrites a duration table to$GITHUB_STEP_SUMMARYfrom the unit job and each UI shard. Run against the real bundle from run 32473179239, it surfaces exactly the hotspots that took manual digging to find:It runs on failure as well, because a red run is when the durations matter most, and it never fails the job: a summary that can break a green run is worse than no summary. A missing or unreadable bundle exits 0 with a note.
Verification
actionlintclean across all six workflows,shellcheck -x --severity=warningclean on both new scripts. Both were exercised against real artifacts, in the passing and the failing direction.