Skip to content

feat: go mod validator repo sha exceptions#1562

Merged
erikburt merged 3 commits into
mainfrom
feat/go-mod-validator-sha-exceptions
May 26, 2026
Merged

feat: go mod validator repo sha exceptions#1562
erikburt merged 3 commits into
mainfrom
feat/go-mod-validator-sha-exceptions

Conversation

@erikburt
Copy link
Copy Markdown
Contributor

@erikburt erikburt commented May 26, 2026

Adds repo-sha-exceptions for one-off exceptions to go mod validation. This has arised more than once, and will allow us to allow-list specific SHAs instead of long-lived branches for one-off exceptions.

Changes

  • Adds repo-sha-exceptions input
  • Short-circuit logic for sha exceptions
  • Some unit tests

Testing

Tested using this PR: smartcontractkit/chainlink#22528

Before (no exception):

Found 7 invalid dependencies.
::error file=/Users/erik/Documents/repos/chainlink/core/scripts/go.mod::[/Users/erik/Documents/repos/chainlink/core/scripts/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 // indirect not found in (develop).%0AVersion(commit): c2a8d09e5b46%0ATree: https://github.com/smartcontractkit/chainlink-aptos/tree/c2a8d09e5b46%0ACommit: https://github.com/smartcontractkit/chainlink-aptos/commit/c2a8d09e5b46 
::debug::Finding line number for github.com/smartcontractkit/chainlink-aptos in /Users/erik/Documents/repos/chainlink/deployment/go.mod. (github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46)
::error file=/Users/erik/Documents/repos/chainlink/deployment/go.mod,line=39::[/Users/erik/Documents/repos/chainlink/deployment/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 not found in (develop).%0AVersion(commit): c2a8d09e5b46%0ATree: https://github.com/smartcontractkit/chainlink-aptos/tree/c2a8d09e5b46%0ACommit: https://github.com/smartcontractkit/chainlink-aptos/commit/c2a8d09e5b46 
::debug::Finding line number for github.com/smartcontractkit/chainlink-aptos in /Users/erik/Documents/repos/chainlink/go.mod. (github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46)
::error file=/Users/erik/Documents/repos/chainlink/go.mod,line=81::[/Users/erik/Documents/repos/chainlink/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 not found in (develop).%0AVersion(commit): c2a8d09e5b46%0ATree: https://github.com/smartcontractkit/chainlink-aptos/tree/c2a8d09e5b46%0ACommit: https://github.com/smartcontractkit/chainlink-aptos/commit/c2a8d09e5b46 
::debug::Finding line number for github.com/smartcontractkit/chainlink-aptos in /Users/erik/Documents/repos/chainlink/integration-tests/go.mod. (github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46)
::error file=/Users/erik/Documents/repos/chainlink/integration-tests/go.mod,line=27::[/Users/erik/Documents/repos/chainlink/integration-tests/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 not found in (develop).%0AVersion(commit): c2a8d09e5b46%0ATree: https://github.com/smartcontractkit/chainlink-aptos/tree/c2a8d09e5b46%0ACommit: https://github.com/smartcontractkit/chainlink-aptos/commit/c2a8d09e5b46 
::debug::Finding line number for github.com/smartcontractkit/chainlink-aptos in /Users/erik/Documents/repos/chainlink/integration-tests/load/go.mod. (github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46)
::error file=/Users/erik/Documents/repos/chainlink/integration-tests/load/go.mod,line=18::[/Users/erik/Documents/repos/chainlink/integration-tests/load/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 not found in (develop).%0AVersion(commit): c2a8d09e5b46%0ATree: https://github.com/smartcontractkit/chainlink-aptos/tree/c2a8d09e5b46%0ACommit: https://github.com/smartcontractkit/chainlink-aptos/commit/c2a8d09e5b46 
::debug::Finding line number for github.com/smartcontractkit/chainlink-aptos in /Users/erik/Documents/repos/chainlink/system-tests/lib/go.mod. (github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46)
::error file=/Users/erik/Documents/repos/chainlink/system-tests/lib/go.mod,line=34::[/Users/erik/Documents/repos/chainlink/system-tests/lib/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 not found in (develop).%0AVersion(commit): c2a8d09e5b46%0ATree: https://github.com/smartcontractkit/chainlink-aptos/tree/c2a8d09e5b46%0ACommit: https://github.com/smartcontractkit/chainlink-aptos/commit/c2a8d09e5b46 
::debug::Finding line number for github.com/smartcontractkit/chainlink-aptos in /Users/erik/Documents/repos/chainlink/system-tests/tests/go.mod. (github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46)
::error file=/Users/erik/Documents/repos/chainlink/system-tests/tests/go.mod,line=599::[/Users/erik/Documents/repos/chainlink/system-tests/tests/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 not found in (develop).%0AVersion(commit): c2a8d09e5b46%0ATree: https://github.com/smartcontractkit/chainlink-aptos/tree/c2a8d09e5b46%0ACommit: https://github.com/smartcontractkit/chainlink-aptos/commit/c2a8d09e5b46 
::error::validation failed for 7 dependencies

After (with exception):

Validating dependency: smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46
::debug::SHA exceptions for smartcontractkit/chainlink-aptos: c2a8d09e5b46c1c7815700f645a50caf8a466bda
[/Users/erik/Documents/repos/chainlink/core/scripts/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 // indirect allowed by SHA exception (matched: c2a8d09e5b46c1c7815700f645a50caf8a466bda)
Validating dependency: smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46
::debug::SHA exceptions for smartcontractkit/chainlink-aptos: c2a8d09e5b46c1c7815700f645a50caf8a466bda
[/Users/erik/Documents/repos/chainlink/deployment/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 allowed by SHA exception (matched: c2a8d09e5b46c1c7815700f645a50caf8a466bda)
Validating dependency: smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46
::debug::SHA exceptions for smartcontractkit/chainlink-aptos: c2a8d09e5b46c1c7815700f645a50caf8a466bda
[/Users/erik/Documents/repos/chainlink/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 allowed by SHA exception (matched: c2a8d09e5b46c1c7815700f645a50caf8a466bda)
Validating dependency: smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46
::debug::SHA exceptions for smartcontractkit/chainlink-aptos: c2a8d09e5b46c1c7815700f645a50caf8a466bda
[/Users/erik/Documents/repos/chainlink/integration-tests/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 allowed by SHA exception (matched: c2a8d09e5b46c1c7815700f645a50caf8a466bda)
Validating dependency: smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46
::debug::SHA exceptions for smartcontractkit/chainlink-aptos: c2a8d09e5b46c1c7815700f645a50caf8a466bda
[/Users/erik/Documents/repos/chainlink/integration-tests/load/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 allowed by SHA exception (matched: c2a8d09e5b46c1c7815700f645a50caf8a466bda)
Validating dependency: smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46
::debug::SHA exceptions for smartcontractkit/chainlink-aptos: c2a8d09e5b46c1c7815700f645a50caf8a466bda
[/Users/erik/Documents/repos/chainlink/system-tests/lib/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 allowed by SHA exception (matched: c2a8d09e5b46c1c7815700f645a50caf8a466bda)
Validating dependency: smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46
::debug::SHA exceptions for smartcontractkit/chainlink-aptos: c2a8d09e5b46c1c7815700f645a50caf8a466bda
[/Users/erik/Documents/repos/chainlink/system-tests/tests/go.mod] dependency github.com/smartcontractkit/chainlink-aptos@v0.0.0-20260518211324-c2a8d09e5b46 allowed by SHA exception (matched: c2a8d09e5b46c1c7815700f645a50caf8a466bda)
validation successful for all go.mod dependencies

@erikburt erikburt self-assigned this May 26, 2026
@erikburt erikburt changed the title Feat/go mod validator sha exceptions feat: go mod validator repo sha exceptions May 26, 2026
@erikburt erikburt marked this pull request as ready for review May 26, 2026 17:19
@erikburt erikburt requested a review from a team as a code owner May 26, 2026 17:19
@erikburt erikburt merged commit 6eb2050 into main May 26, 2026
18 checks passed
@erikburt erikburt deleted the feat/go-mod-validator-sha-exceptions branch May 26, 2026 18:21
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.

3 participants