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: Add option for using monolithic push #177

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

joonas
Copy link
Contributor

@joonas joonas commented Oct 13, 2024

Following up on #175 and #176, this rounds out the remaining set of functionality that's needed to use rust-oci-client for pushing to GCP Artifact Registry similarly to how oras-go can be used for this.

This seemed like an option that should be available for configuring the client in case you're working with a registry that's not fully spec compliant.

Copy link
Contributor

@flavio flavio 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 the change, I left a minor comment

src/client.rs Outdated
Comment on lines 562 to 564
if self.config.use_monolithic_push {
self.push_blob_monolithically(image_ref, data, digest).await
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a matter of personal taste, I would rewrite it get rid of the extra indentation caused by the else statement:

if self.config.use_monolithic_push {
  return self.push_blob_monolithically(image_ref, data, digest).await;
} 

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion, I've adjusted the code accordingly 👍

@joonas joonas force-pushed the feat/use-monolithic-push branch from 145945d to 30c0b71 Compare October 22, 2024 22:45
Copy link
Contributor

@thomastaylor312 thomastaylor312 left a comment

Choose a reason for hiding this comment

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

Good to go whenever you're ok with it @flavio

Copy link
Contributor

@flavio flavio 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 having done the requested change

@flavio flavio merged commit f2fb2e9 into oras-project:main Oct 24, 2024
5 checks passed
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