Skip to content

Conversation

@nalind
Copy link
Member

@nalind nalind commented Oct 20, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add a CommitResults() method that returns a structure with information, to make it easier to extend.
Use it to add a --metadata-file flag to buildah commit and buildah build.

How to verify it

New and updated integration tests!

Which issue(s) this PR fixes:

Fixes #6428.

Special notes for your reviewer:

Does this PR introduce a user-facing change?

The `buildah build` and `buildah commit` commands now accept a `--metadata-file` flag.

@openshift-ci openshift-ci bot added kind/feature Categorizes issue or PR as related to a new feature. approved labels Oct 20, 2025
@packit-as-a-service
Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

@TomSweeneyRedHat
Copy link
Member

Quick breeze review looks good, but all kinds of red unhappiness in the tests.

Rename the Executor and StageExecutor types to make them private to the
package.  Exporting them wasn't required for them to supply an interface
that they implemented for use by github.com/openshift/imagebuilder, and
we're about to change the signature for StageExecutor.Execute().

Signed-off-by: Nalin Dahyabhai <[email protected]>
Add a CommitResults() method which returns a structure on success,
changing Commit() into a wrapper for it which returns a subset of the
data to keep its signature stable.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Add a MetadataFile field to BuildOptions, to which we write a dictionary
of information about a just-committed image.

Pay more attention to sourceDateEpoch than to timestamp when we're
tagging an existing image with the intended destination name.

Signed-off-by: Nalin Dahyabhai <[email protected]>
Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 21, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, nalind

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Member

@TomSweeneyRedHat TomSweeneyRedHat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TomSweeneyRedHat
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Oct 22, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit e0e108c into containers:main Oct 22, 2025
41 checks passed
@nalind nalind deleted the metadata-file branch October 22, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved kind/feature Categorizes issue or PR as related to a new feature. lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for --metadata-file used by laravel sail for better docker compatibility

3 participants