Skip to content

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
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)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm going to treat removing this redirect as a separate issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

#1974

I've assigned myself to that work. But this PR should probably go ahead and proceed as-is, w/ passing CI.

@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 3 times, most recently from 469bc7d to 1bd73e3 Compare January 23, 2025 04:58
@dralley dralley force-pushed the remove-manifest-file-compat branch from b917450 to b34991a Compare January 28, 2025 20:27
@dralley dralley force-pushed the remove-manifest-file-compat branch from b34991a to 5978ceb Compare February 19, 2025 19:47
@dralley dralley force-pushed the remove-manifest-file-compat branch from 5978ceb to f8dc033 Compare February 19, 2025 19:55
@dralley dralley force-pushed the remove-manifest-file-compat branch 2 times, most recently from fbe316c to 230ee44 Compare March 29, 2025 18:10
@dralley dralley force-pushed the remove-manifest-file-compat branch 2 times, most recently from c008485 to 72f15ec Compare March 29, 2025 18:50
@dralley dralley force-pushed the remove-manifest-file-compat branch 8 times, most recently from 3ec2422 to 72f15ec Compare March 31, 2025 13:30
@dralley dralley requested a review from git-hyagi March 31, 2025 14:16
Copy link
Contributor

@gerrod3 gerrod3 left a comment

Choose a reason for hiding this comment

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

Two small fixes then lgtm!

@dralley dralley force-pushed the remove-manifest-file-compat branch from 72f15ec to d59fcd0 Compare March 31, 2025 14:44
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 d59fcd0 to c8d72c7 Compare March 31, 2025 14:45
@dralley dralley merged commit ca2b2a5 into pulp:main Mar 31, 2025
12 checks passed
@dralley dralley deleted the remove-manifest-file-compat branch March 31, 2025 15:26
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

3 participants