buildah icon indicating copy to clipboard operation
buildah copied to clipboard

Refactor NewImageSource to add a manifest type abstraction

Open aaronlehmann opened this issue 1 year ago • 4 comments

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Currently, NewImageSource creates a Docker schema2 manifest and an OCI manifest at the same time. This precludes functionality that isn't supported by both manifest types, for example zstd compression. Refactoring this to create only the desired manifest type solves this and also cleans up the code by separating manifest-type-specific code into distinct implementations of a "manifest builder".

How to verify it

Existing tests should suffice since this does not change any semantics, it only cleans up the implementation.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

See discussion in https://github.com/containers/buildah/pull/5452.

Does this PR introduce a user-facing change?

None

aaronlehmann avatar Sep 17 '24 23:09 aaronlehmann

@mtrmac: PTAL - thanks!

aaronlehmann avatar Sep 19 '24 14:09 aaronlehmann

@rhatdan @mtrmac: Would it be possible to get some eyes on this when you have a moment? I was asked to do this to unblock #5452, so I would really appreciate if we could avoid letting it sit too long.

aaronlehmann avatar Sep 24 '24 17:09 aaronlehmann

Any possibility of moving this forward? It's a bit frustrating that I was asked to come back and do this refactor, but the PR is not getting reviewed.

aaronlehmann avatar Oct 08 '24 04:10 aaronlehmann

@mtrmac have you had a chance to look at this?

TomSweeneyRedHat avatar Nov 01 '24 22:11 TomSweeneyRedHat

@aaronlehmann sorry for the delay. Many of the maintainers are Red Hat based, and we've all been under a big crunch the past few weeks.

TomSweeneyRedHat avatar Nov 01 '24 22:11 TomSweeneyRedHat

@Honny1 Do you happen to have the time to take a look?

mtrmac avatar Nov 04 '24 16:11 mtrmac

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

github-actions[bot] avatar Dec 05 '24 00:12 github-actions[bot]

@TomSweeneyRedHat @mtrmac @Honny1: Would any of you be able to look at this? I've been trying to get this through for a very long time.

aaronlehmann avatar Feb 27 '25 13:02 aaronlehmann

@flouthoc do you happen to have time for this?

mtrmac avatar Feb 27 '25 16:02 mtrmac

I will review this thanks.

flouthoc avatar Feb 28 '25 18:02 flouthoc

@aaronlehmann Could you please rebase this first, just to be sure if every thing is good.

flouthoc avatar Feb 28 '25 18:02 flouthoc

Rebased.

aaronlehmann avatar Feb 28 '25 21:02 aaronlehmann

Hi @flouthoc, have you had a chance to look at this yet?

aaronlehmann avatar Mar 10 '25 17:03 aaronlehmann

Rebased again.

aaronlehmann avatar Mar 18 '25 17:03 aaronlehmann

@flouthoc: Hoping I can get this merged before it needs yet another rebase :smile:

aaronlehmann avatar Mar 19 '25 16:03 aaronlehmann

@nalind: Thanks for the review - updated based on your feedback.

aaronlehmann avatar Mar 19 '25 19:03 aaronlehmann

@nalind @flouthoc: Any further comments?

aaronlehmann avatar Mar 21 '25 21:03 aaronlehmann

@nalind @flouthoc: Can we please move ahead with merging this? Thanks!

aaronlehmann avatar Mar 25 '25 17:03 aaronlehmann

PR LGTM I am waiting for @nalind to ack on his last remarks.

flouthoc avatar Mar 25 '25 21:03 flouthoc

@nalind: Sorry to be so persistent here, but I'd really like to get this merged, since it has been dragging on for so long, and it's hard to keep coming back to this after long pauses.

aaronlehmann avatar Mar 31 '25 15:03 aaronlehmann

Made the changes, thanks!

aaronlehmann avatar Apr 10 '25 20:04 aaronlehmann

@nalind: Just checking on this again...

aaronlehmann avatar May 07 '25 18:05 aaronlehmann

@nalind @flouthoc: I'm grateful for your help moving this forward, but I have to say this has been a very frustrating experience. I'm making one last request for a final review so I can get this merged.

aaronlehmann avatar May 20 '25 18:05 aaronlehmann

I’m afraid I can’t spend much time on this now, and this is probably locally not helpful: I happened to notice parallel https://github.com/containers/buildah/pull/6159 .

mtrmac avatar May 20 '25 18:05 mtrmac

@aaronlehmann Apologies for the delay. The PR LGTM, I am rebasing this and getting this merged. This already has 2 LGTM.

flouthoc avatar May 20 '25 18:05 flouthoc

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aaronlehmann, 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

openshift-ci[bot] avatar May 20 '25 18:05 openshift-ci[bot]

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

Thanks so much @flouthoc, I really appreciate it. This refactor was motivated by #5452, which now becomes a trivial change to the OCI manifest code path. I've rebased that PR - if you could take a look that would be awesome!

aaronlehmann avatar May 20 '25 22:05 aaronlehmann