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

feat(push): allow pushing composed components to registry #2996

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fibonacci1729
Copy link
Contributor

@fibonacci1729 fibonacci1729 commented Jan 27, 2025

WIP for now to flesh out the concept.

Implements #2988

Still working to add a test but the meat-and-potatoes is ready to serve.

@fibonacci1729 fibonacci1729 force-pushed the push branch 3 times, most recently from ee371d1 to 9176ca1 Compare January 30, 2025 18:10
@fibonacci1729 fibonacci1729 marked this pull request as ready for review January 30, 2025 18:10
crates/oci/src/client.rs Outdated Show resolved Hide resolved
crates/oci/src/client.rs Outdated Show resolved Hide resolved
src/commands/registry.rs Outdated Show resolved Hide resolved
@fibonacci1729
Copy link
Contributor Author

cc/ @itowlson a simple test is now included.

@fibonacci1729
Copy link
Contributor Author

@itowlson friendly ping that this is ready for another review!

Copy link
Collaborator

@itowlson itowlson left a comment

Choose a reason for hiding this comment

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

First off, sorry for taking so long to get to this.

I don't really feel capable of reviewing this beyond "I affirm that Brian is not sneaking in a Bitcoin miner," but from what I can tell it seems sound, and I assume you've tested it against suitable hosts which is more reassuring than any reading of mine could be!

I did have some comments on the style and the testing - they're not blockers, but I'd like to see if they're easy to address before we merge. (And please ignore the melodramatic last comment - we've already covered that but I'm struggling to reconcile myself to the outcome!)

crates/oci/src/client.rs Show resolved Hide resolved
crates/oci/src/client.rs Outdated Show resolved Hide resolved
crates/oci/src/client.rs Outdated Show resolved Hide resolved
crates/oci/Cargo.toml Show resolved Hide resolved
) -> Result<Vec<ImageLayer>> {
let mut layers = Vec::new();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@itowlson Calling attention to this diff because it's minimized by default. Let me know if this is easier to follow.

Copy link
Collaborator

@itowlson itowlson left a comment

Choose a reason for hiding this comment

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

Thanks for those changes - this feels much more readable now (at least to me!). Appreciate your patience with my niggling. If you're still comfortable with it then good to go! :shipit:

@fibonacci1729
Copy link
Contributor Author

Thanks for the review! I think i'll try to get 1 or 2 more 👀 just to spread awareness.

@fibonacci1729 fibonacci1729 requested a review from a team February 12, 2025 21:46
@@ -49,6 +49,10 @@ pub struct Push {
)]
pub insecure: bool,

/// Skip composing the application's components before pushing it.
#[clap(long = "skip-compose")]
pub skip_compose: bool,
Copy link
Contributor

Choose a reason for hiding this comment

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

Clarifying that now this will default to true right so this is a breaking change to how users expect artifacts to be produced by default? Run runtimes should still be able to handle the composed artifacts so it shouldn't break runtimes that are tied to this CLI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It defaults to false but yes the rest of your comment is correct! A follow up to this would be to set this to true for all the plugins that push to the registry.

Copy link
Contributor

Choose a reason for hiding this comment

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

if it defaults to false then there is no change. I thought the idea was for the default to unlock success for SpinKube (the shim)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry! Yeah you're correct: the default is skip-compose = false which will always push compositions by default. My bad, I was responding literally to the value being false not the behavior 😅

crates/compose/src/lib.rs Show resolved Hide resolved
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.

Feature Request: Add flag to registry push that pushes composed components
3 participants