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

[PULP-255] Remove backward compatibility for manifest with artifact #1890

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

Conversation

dralley
Copy link
Contributor

@dralley dralley commented Jan 14, 2025

This commit removes support for manifests storing their data inside an artifact instead of using the recently introduced Manifest.data text field.

closes #1621

@dralley dralley force-pushed the remove-manifest-file-compat branch from 2b3b472 to daf186d Compare January 14, 2025 04:33
@@ -1120,7 +1120,7 @@ def handle_safe_method(self, request, path, pk):
self.fetch_manifest(remote, pk)
return redirects.redirect_to_content_app("manifests", pk)
elif manifest:
return redirects.issue_manifest_redirect(manifest)
return Response(manifest.data)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@git-hyagi @gerrod3 Any idea which headers specifically he was referring to?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was checking the OCI spec and found this:

"In a successful response, the Content-Type header will indicate the type of the returned manifest. The Content-Type header SHOULD match what the client pushed as the manifest's Content-Type. If the manifest has a mediaType field, clients SHOULD reject unless the mediaType field's value matches the type specified by the Content-Type header."
"A successful response SHOULD contain the digest of the uploaded blob in the header Docker-Content-Digest."

and searching the sample (return web.Response(...)) provided by Lubos, I found these headers definitions (which comply with the oci spec):

headers = {
"Content-Type": media_type,
"Docker-Content-Digest": digest,
"Docker-Distribution-API-Version": "registry/2.0",
}
return web.Response(text=raw_text_manifest, headers=headers)

@dralley dralley changed the title Remove backward compatibility for manifest with artifact [PULP-255] Remove backward compatibility for manifest with artifact Jan 14, 2025
@dralley dralley force-pushed the remove-manifest-file-compat branch 3 times, most recently from 969fc97 to 5020597 Compare January 15, 2025 21:46
@dralley dralley force-pushed the remove-manifest-file-compat branch 2 times, most recently from 9a6be80 to 469bc7d Compare January 23, 2025 04:54
This commit removes support for manifests storing their data inside an
artifact instead of using the recently introduced  Manifest.data text
field.

closes pulp#1621
@dralley dralley force-pushed the remove-manifest-file-compat branch from 469bc7d to 1bd73e3 Compare January 23, 2025 04:58
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.

Stop supporting manifests with artifacts and enforce the data migration
2 participants