Repository navigation
feat(hooks): skip only the named delivery gates at pre-push with SCC_SKIP_CHECKS - #59
Merged
Merged
Conversation
…SKIP_CHECKS SCC_SKIP_HOOKS=1 was the only way past a gate a machine cannot run - a suite needing a database the checkout lacks - and it also dropped the artifact, attribution and pull-request checks. SCC_SKIP_CHECKS=test (a comma list, or 1/all for the four) passes over only those gates at pre-push, warns which it did not run, and rejects an unknown gate name with exit 1. Plan: plans/pre-push-skip-checks.md
Owner
Author
|
Reviews recorded in the body. CI earlier failed on govulncheck stdlib findings, fixed by #60. |
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.
What changed
The pre-push hook gets a narrow escape:
SCC_SKIP_CHECKS.SCC_SKIP_CHECKS=test(a comma list such aslint,test, or1/allfor all four) skips only those delivery-gate commands for one push. The artifact, attribution and pull-request validators still run.tests) exits 1 instead of quietly running the suite.SCC_SKIP_CHECKSalongsideSCC_SKIP_HOOKS=1.validate.WithoutGatesis the option behind this.scc validate --checksandscc checkdo not read the variable, so CI still enforces all four gates.Why: when a machine could not run part of the suite (for example a database it does not have),
SCC_SKIP_HOOKS=1was the only way to push, and it also turned off every other check.Plan:
plans/pre-push-skip-checks.md. Docs:docs/wiki/pages/hooks.md, README, wiki changelog.Not done:
internal/assets/templates/rules/delivery.mddoes not mention the variable. Changing a template requires anassets.Versionbump, which is outside this change.Verification
scc validate --checks --pr: exit 0, 1032 tests, coverage 86.4%, 0 findings.TestWithoutGatesPassesOverOnlyTheNamedGates,TestPrePushSkipsOnlyTheGatesNamed,TestSkippedGatesReadsTheEnvironmentValue.golangci-lint runandgolangci-lint fmt --diff: clean.Reviews
trueis accepted but undocumented, and the hint matches findings by thecheck./tests.rule prefixes.SCC_SKIP_HOOKS/--no-verifyalready grant.