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

rework OCI push handling #68

Merged
merged 0 commits into from
Aug 29, 2022
Merged

rework OCI push handling #68

merged 0 commits into from
Aug 29, 2022

Conversation

mandelsoft
Copy link
Contributor

@mandelsoft mandelsoft commented Aug 24, 2022

What this PR does / why we need it:

The actual version of the OCI push handling taken from the containerd library does not handle retries during a manifest push
correctly.

The API approach of providing a writer to the client, is not suitable for retries. The actual change migrates the push API from a eriter to a reader-factory approach, also used by the http client API.

Additionally various problems concerning the explode handling and the transfer CLI command are fixed.

Which issue(s) this PR fixes:
Fixes #61

Special notes for your reviewer:

Release note:

@mandelsoft mandelsoft requested a review from a team as a code owner August 24, 2022 17:24
@mandelsoft mandelsoft requested review from Diaphteiros and robertgraeff and removed request for a team August 24, 2022 17:24
Copy link
Contributor

@Skarlso Skarlso left a comment

Choose a reason for hiding this comment

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

LGTM

}
acc = localblob.New(blob.Digest().String(), hint, blob.MimeType(), acc)
}
return acc, nil
}

func wrap(err error, msg string, args ...interface{}) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

So... yet another way for wrapping errors in this codebase? :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a local method used to encapsulate the multiple occurrences of an error wrapping with a common context handling for the local package. It is used to avoid the same coding again and again.

@gardener-robot
Copy link
Contributor

@robertgraeff, @Diaphteiros You have pull request review open invite, please check

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.

ocm transfer componentarchive fails
3 participants