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

allow non-gzip layers #23

Merged
merged 1 commit into from
Sep 25, 2024
Merged

allow non-gzip layers #23

merged 1 commit into from
Sep 25, 2024

Conversation

tofay
Copy link
Collaborator

@tofay tofay commented Sep 25, 2024

I'm exploring using zstd layers in rpmoci: to do that I'd like to create a Layer with a different media type and then use OciDir::push_layer

Signed-off-by: Tom Fay <tomfay@microsoft.com>
@ariel-miculas
Copy link
Collaborator

I'm wondering whether we should use a Descriptor instead of a Blob and MediaType in the Layer struct.

@tofay tofay mentioned this pull request Sep 25, 2024
@tofay
Copy link
Collaborator Author

tofay commented Sep 25, 2024

I'm wondering whether we should use a Descriptor instead of a Blob and MediaType in the Layer struct.

Makes sense. I'm also wondering why the Layer fields are public at all.

@cgwalters
Copy link
Collaborator

Makes sense. I'm also wondering why the Layer fields are public at all.

Versus having getters? I'm in favor, though let's just start a list of things to change in the next server bump...I don't have a big appetite for another semver just for that.

Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Ah yeah what we had before was clearly suboptimal.

Hmm maybe for consistency it's GzipLayerWriter that sets the mime type explicitly too? I guess yeah that gets to wanting to have an explicit descriptor.

Short of some server-breaking changes this looks sane to me.

@cgwalters cgwalters merged commit 9cf9434 into containers:main Sep 25, 2024
3 checks passed
@tofay
Copy link
Collaborator Author

tofay commented Sep 25, 2024

Short of some server-breaking changes this looks sane to me.

This change is semver breaking (https://doc.rust-lang.org/cargo/reference/semver.html#struct-add-public-field-when-no-private).

@cgwalters
Copy link
Collaborator

This change is semver breaking (https://doc.rust-lang.org/cargo/reference/semver.html#struct-add-public-field-when-no-private).

Technically...yes, but IMO practically no one is using struct literals for this.

Anyways I am also OK to just bump server and make other changes too, though we should also I think try to "settle down" after hopefully just one more bump for a while hopefully.

@ariel-miculas
Copy link
Collaborator

I do have some stuff lined up besides #22, basically to implement this function in ocidir-rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants