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

manifest: addCompression use default from containers.conf #5014

Closed
wants to merge 2 commits into from

Conversation

flouthoc
Copy link
Collaborator

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?

manifest: addCompression use default from containers.conf

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 30, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc

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

@flouthoc
Copy link
Collaborator Author

PR similar to containers/podman#19790

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Is this really something we should support in Buildah? I am not against it but Buildah ignores containers.conf in most places. This PR illustrates it quick a bit since "compression-format" is ignored but "add-compression" isn't.

@flouthoc
Copy link
Collaborator Author

Is this really something we should support in Buildah? I am not against it but Buildah ignores containers.conf in most places. This PR illustrates it quick a bit since "compression-format" is ignored but "add-compression" isn't.

No issues, I just created PR for consistency with podman can drop PR if everybody agrees with it

@rhatdan
Copy link
Member

rhatdan commented Aug 31, 2023

Where we can, I would want buildah to work with containers.conf?

Signed-off-by: Aditya R <arajan@redhat.com>
@flouthoc
Copy link
Collaborator Author

Rebased in-case if consensus is made to merge this one.

Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

I'm torn. Generally, I am supportive of supporting containers.conf in Buildah but as mentioned before, I do not think it's a nice user experience if only 1 option is used. What about compression_format? I think we should at a minimum support all fields which are sensitive to compression.

Then we can tackle the rest. But imagine being a user trying to figure out what works and what doesn't. It's even hard for maintainer as we had to look at the code.

@TomSweeneyRedHat
Copy link
Member

I'm fence-sitting too. I'm thinking primarily of a Buildah Only user. Hopping into containers.conf, seeing the myriad of options, and only being able to use one. But I see the other side of the coin, too, where you want the consistency to happen between Buildah and Podman.

All in all, I'm slightly leaning toward including containers.conf, but we'll need a lot of Buildah doc in and out of it explaining what is and is not used by Buildah.

@vrothberg
Copy link
Member

So, I am OK to go step-by-step and containers.conf support gradually BUT - as mentioned above - we should at least support the other compression options as well.

@rhatdan
Copy link
Member

rhatdan commented Sep 6, 2023

Agreed

@@ -49,6 +50,11 @@ type manifestInspectOpts = struct {
}

func init() {
containerConfig, err := config.Default()
if err != nil {
logrus.Errorf(err.Error())
Copy link
Member

@nalind nalind Sep 6, 2023

Choose a reason for hiding this comment

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

Always use pass a format specifier as the first argument for functions like Errorf(), so that we don't have to track down surprises later. I am concerned about parsing this again in this init(), when we're doing the same thing in both from.go and main.go.

cat > $contextdir/containers.conf << _EOF
[engine]
add_compression = ["zstd"]
_EOF
Copy link
Member

Choose a reason for hiding this comment

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

These can be regular files in the source tree, since their content isn't dynamic.

@rhatdan
Copy link
Member

rhatdan commented Oct 12, 2023

@flouthoc any update coming on this one?

Copy link

A friendly reminder that this PR had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Nov 13, 2023

@flouthoc friendly ping.

@rhatdan rhatdan removed the stale-pr label Nov 13, 2023
Copy link

A friendly reminder that this PR had no activity for 30 days.

rhatdan pushed a commit to rhatdan/buildah that referenced this pull request Dec 16, 2023
Replaces: containers#5014

Signed-off-by: Aditya R <arajan@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
@rhatdan rhatdan closed this Dec 16, 2023
TomSweeneyRedHat pushed a commit to TomSweeneyRedHat/buildah that referenced this pull request Feb 16, 2024
Replaces: containers#5014

Signed-off-by: Aditya R <arajan@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
TomSweeneyRedHat pushed a commit to TomSweeneyRedHat/buildah that referenced this pull request Feb 16, 2024
Replaces: containers#5014

Signed-off-by: Aditya R <arajan@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
TomSweeneyRedHat pushed a commit to TomSweeneyRedHat/buildah that referenced this pull request Feb 16, 2024
Replaces: containers#5014

Signed-off-by: Aditya R <arajan@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
TomSweeneyRedHat pushed a commit to TomSweeneyRedHat/buildah that referenced this pull request Feb 17, 2024
Replaces: containers#5014

Signed-off-by: Aditya R <arajan@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
TomSweeneyRedHat pushed a commit to TomSweeneyRedHat/buildah that referenced this pull request Feb 17, 2024
Replaces: containers#5014

Signed-off-by: Aditya R <arajan@redhat.com>
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: tomsweeneyredhat <tsweeney@redhat.com>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 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

5 participants