Feat: Permit soft-fail image builds - #13
Merged
tykeal merged 1 commit intoAug 4, 2026
Merged
Conversation
ModeSevenIndustrialSolutions
requested review from
a team
and
a lite review from Copilot
August 4, 2026 07:49
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
August 4, 2026 07:49
View session
There was a problem hiding this comment.
Pull request overview
Adds a build_permit_fail input to the reusable Docker verify lane so image build failures can be recorded and summarized while still allowing successfully-built images to proceed to tests/SBOM/Grype, with downstream jobs safely skipped when zero images were built.
Changes:
- Introduces
build_permit_failworkflow_call input and uses it to gate build failures at the end of the build step (instead of failing fast). - Makes build output handling robust when zero images are produced (skips archive upload and downstream jobs via
image_count). - Updates the self-test matrix and README to document and validate the new behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | Documents the new build_permit_fail input and its intent. |
| .github/workflows/testing.yaml | Adds a new self-test matrix leg covering permitted build failures. |
| .github/workflows/build-test.yaml | Implements soft-fail build behavior, summaries, and downstream skipping when no images are built. |
Suppressed comments (1)
.github/workflows/build-test.yaml:666
- This warning message says “image(s) failed to build”, but the failures list can also include non-image entries (e.g., "build_command"). Consider wording that doesn’t assume every failure is an image build.
echo "::warning::${#failures[@]} image(s) failed to" \
"build; permitted by build_permit_fail"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Repositories whose Dockerfiles predate the current state of their upstream bases and package feeds cannot pass a gating build. A probe of ONAP sdc/sdc-docker-base built 1 of 6 images: two bases have left Docker Hub, one apt suite is archived, one apk pin is unsatisfiable, and the chef gem no longer resolves on the Ruby the image ships. Gating Gerrit on that build would place a permanent Verified -1 on every change, punishing contributors for breakage that predates the change under test. The build job now attempts every image, records which fail, and gates on the outcome through build_permit_fail, matching the test/audit/grype soft-fail family the lane already carries. The images that do build carry on to the test, SBOM and scan jobs, so partial coverage stays useful, and Dockerfile lint is unaffected because it never needed a build. Unlike the audit toggles this input takes no repository variable fallback: build gating must not switch off across an organisation by accident. A build that produces nothing is now a supported outcome, so the archive upload and the test/SBOM jobs check the image count rather than assuming an artifact exists. Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
ModeSevenIndustrialSolutions
force-pushed
the
feat/build-permit-fail
branch
from
August 4, 2026 07:58
db67c42 to
17ec1d6
Compare
Copilot started reviewing on behalf of
ModeSevenIndustrialSolutions
August 4, 2026 07:59
View session
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
README.md:91
- This documentation says the input only permits “image build failures”, but the workflow also records and gates on
build_commandfailures via thefailureslist. The description should reflect thatbuild_permit_failapplies to both native image builds and thebuild_commandescape hatch.
| `build_permit_fail` | boolean | `false` | Permit image build failures; images that build carry on downstream |
.github/workflows/build-test.yaml:99
- The input description says it permits “image build failures”, but the implementation also permits failures of the
build_commandescape hatch (it adds thebuild_commandsentinel to thefailuresarray and gates on it). Update the description so callers understand this input covers both paths.
description: >-
Permit image build failures without failing the workflow.
Intended for repositories whose Dockerfiles predate the
current state of their upstream bases and package feeds:
the lane still lints every Dockerfile and reports which
askb
approved these changes
Aug 4, 2026
tykeal
approved these changes
Aug 4, 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.
Adds
build_permit_failto the verify lane, so repositories whoseDockerfiles predate the current state of their upstream bases and
package feeds can adopt CI without gating review on breakage that
predates the change under test.
Why
A local probe of the Round 2 pilot, ONAP
sdc/sdc-docker-base, built1 of 6 images with completely unrestricted egress:
base_sdc-cassandracassandra:3.11.4apt-get update404base_sdc-cqlshopenjdk:8-jdk-alpinebase_sdc-jettyjetty:9.4.18-jre8-alpinechef:13.8.5→bundlernow needs Ruby ≥ 3.2; image ships 2.5base_sdc-pythonnexus3.onap.org:10001/onap/integration-python:8.0.0ruby=2.7.5-r0unsatisfiablebase_sdc-sanityopenjdk:8-jdk-alpinebase_sdc-vncconsol/ubuntu-xfce-vnc:1.3.0The
base_sdc-jettyfailure had looked like an egress-block problem inearlier CI (
rubygems.orgECONNREFUSED). It is not:build_permit_egress_traffic: truedoes not rescue it, because onceRubyGems is reachable it resolves a
bundlerthe image's Ruby cannotrun. Gating Gerrit on that build would place a permanent Verified -1 on
every change to the repository.
What changed
first failure, collecting successes and failures separately and
gating at the end on
build_permit_fail. Images that do build carryon to the test, SBOM and scan jobs, so partial coverage stays useful.
Dockerfile lint is unaffected, having never needed a build.
build_commandpath gets the same treatment: a non-zero commandis recorded rather than fatal, and "exited zero but created nothing"
reports once rather than twice.
image_countguards thearchive upload and the
tests/sbomjob conditions, soif-no-files-found: errorstill catches a genuine export failure;grypeskips throughsbom.and outputs land before the gate so both stay visible either way.
build_permit_faildeliberately takes no repository variablefallback, unlike
audit_permit_fail/grype_permit_failwhich honourNO_BLOCK_AUDIT_FAIL. A variable meant for audit findings must notswitch off build gating across an organisation.
Self-test
New matrix leg 5 pairs a buildable fixture image with one declaring a
stage the Dockerfile does not define, under
build_permit_fail: true.It proves the failure is reported, the job succeeds, and the image that
built still reaches SBOM/Grype — without touching the fixture repo.
Validated with
pre-commit(all pass),zizmor --persona auditor(nofindings), and
bash -nplusshellcheckover every extractedrunblock.