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

Fix a sync error with manifests without mediaType #1747

Merged
merged 1 commit into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES/1746.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Resolved an issue with syncing content causing errors when retrieving manifests without a mediaType
definition.
6 changes: 2 additions & 4 deletions pulp_container/app/tasks/sync_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,9 @@ async def _download_and_instantiate_manifest(self, manifest_url, digest):
manifest = Manifest(
digest=digest,
schema_version=(
2
if content_data["mediaType"] in (MEDIA_TYPE.MANIFEST_V2, MEDIA_TYPE.MANIFEST_OCI)
else 1
2 if media_type in (MEDIA_TYPE.MANIFEST_V2, MEDIA_TYPE.MANIFEST_OCI) else 1
),
media_type=content_data["mediaType"],
media_type=media_type,
data=raw_text_data,
annotations=content_data.get("annotations", {}),
)
Expand Down