fix: preserve BuildRun output insecure and timestamp on conversion - #2305
Merged
openshift-merge-bot[bot] merged 1 commit intoAug 25, 2026
Conversation
The BuildRun conversion webhook built the output Image struct with only image, annotations and labels before attaching the push secret, so .spec.output.insecure and .spec.output.timestamp were silently dropped in both directions. Both fields exist in the Image type in v1alpha1 and v1beta1, and the equivalent Build conversion already carries them. A user setting output.insecure to push to an insecure registry, or output.timestamp for a reproducible image timestamp, on a BuildRun had that override discarded without warning once the object passed through conversion, and the build ran with different output settings than requested. Copy both fields in ConvertTo and ConvertFrom, mirroring the Build conversion, and add conversion webhook specs covering the BuildRun output in both directions. Closes shipwright-io#2303 Signed-off-by: Ryan Matthews <ryan.matthews.professional@gmail.com>
Ryntak94
marked this pull request as ready for review
August 25, 2026 03:10
4 tasks
Contributor
Author
|
Heads up for reviewers: #2306 (the deprecated Merging this one first is the cleaner order; once it lands, #2306 reduces to its own single commit. |
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: SaschaSchwarze0 The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
openshift-merge-bot
Bot
merged commit Aug 25, 2026
3499ed0
into
shipwright-io:main
24 of 26 checks passed
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.
Changes
The
BuildRunconversion webhook built the outputImagestruct with onlyImage,AnnotationsandLabelsbefore attaching the push secret, so.spec.output.insecureand.spec.output.timestampwere silently dropped in both directions. Both fields exist in theImagetype inv1alpha1andv1beta1, and the equivalentBuildconversion already carries them (build_conversion.goL201/L208 and L294/L301) — so aBuildround-tripped its output settings intact while aBuildRunoverriding the same settings lost them.A user setting
output.insecureto push to an insecure registry, oroutput.timestampfor a reproducible image timestamp, on aBuildRunhad that override discarded without warning once the object passed through conversion, and the build ran with different output settings than requested.This copies both fields in
ConvertToandConvertFrom, mirroring theBuildconversion, and adds conversion webhook specs covering theBuildRunoutput in both directions.Related Issue
Fixes #2303
Type of PR
/kind bug
Submitter Checklist
Includes docs if changes are user-facing— no API surface or documented behaviour changes; the fix makes existing documented fields behave as documentedRelease Notes