Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build, heredoc: show heredoc summary in build output #5314

Merged
merged 2 commits into from Feb 7, 2024

Conversation

flouthoc
Copy link
Collaborator

@flouthoc flouthoc commented Feb 1, 2024

Buildah must show summary of heredoc content in build output so its easy for developers to understand which heredoc got executed, this is similar to what buildkit does for heredoc content.

See: https://github.com/moby/buildkit/blob/master/frontend/dockerfile/dockerfile2llb/convert.go#L1853

Output is similar to how buildkit produces heredoc summary for build output.

Sample output of buildah

STEP 1/5: FROM docker.io/library/python:latest
STEP 2/5: RUN <<EOF (echo "Hello" >> /hello...)
STEP 3/5: RUN python3 <<EOF (with open("/hello", "w") as f:...)
STEP 4/5: RUN ls -a

What type of PR is this?

/kind api-change
/kind bug
/kind cleanup
/kind deprecation
/kind design
/kind documentation
/kind failing-test
/kind feature
/kind flake
/kind other

What this PR does / why we need it:

How to verify it

Which issue(s) this PR fixes:

Special notes for your reviewer:

Does this PR introduce a user-facing change?

build, heredoc: show heredoc summary in build output

@flouthoc
Copy link
Collaborator Author

flouthoc commented Feb 1, 2024

@containers/buildah-maintainers PTAL

@flouthoc
Copy link
Collaborator Author

flouthoc commented Feb 2, 2024

Ouch this broke older test which was not ready for heredoc's output on build log. Let me retrofit that test.

Buildah must show summary of heredoc content in build output so its easy
for developers to understand which heredoc got executed, this is similar
to what buildkit does for heredoc content.

See: https://github.com/moby/buildkit/blob/master/frontend/dockerfile/dockerfile2llb/convert.go#L1853

Sample output of buildah

```console
STEP 1/5: FROM docker.io/library/python:latest
STEP 2/5: RUN <<EOF (echo "Hello" >> /hello...)
STEP 3/5: RUN python3 <<EOF (with open("/hello", "w") as f:...)
STEP 4/5: RUN ls -a
```

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
Signed-off-by: flouthoc <flouthoc.git@gmail.com>
@flouthoc
Copy link
Collaborator Author

flouthoc commented Feb 2, 2024

Should fine now I think. Let's see.

@rhatdan
Copy link
Member

rhatdan commented Feb 2, 2024

LGTM
@giuseppe @ashley-cui @nalind @vrothberg @Luap99 PTAL

@rhatdan
Copy link
Member

rhatdan commented Feb 6, 2024

Copy link
Member

@giuseppe giuseppe left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Contributor

openshift-ci bot commented Feb 7, 2024

[APPROVALNOTIFIER] This PR is APPROVED

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

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

@openshift-merge-bot openshift-merge-bot bot merged commit db73170 into containers:main Feb 7, 2024
34 checks passed
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants