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

Conversation

git-hyagi
Copy link
Contributor

fixes: #1746

lubosmj
lubosmj previously approved these changes Aug 23, 2024
Copy link
Member

@lubosmj lubosmj left a comment

Choose a reason for hiding this comment

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

Looks reasonable! Do you mind backporting this to 2.20 and releasing it?

mdellweg
mdellweg previously approved these changes Aug 26, 2024
Copy link
Member

@ipanova ipanova left a comment

Choose a reason for hiding this comment

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

The root cause of this issue is not because an old manifest was synced. But because the manifest.json file did not contain at all mediaType field. In reality you look at raw manifest(that fails sync) you will see that this is a normal OCI schema2 image manifest.

ipanova@puffy:/tmp$ skopeo inspect docker://quay.io/fedora/fedora-bootc@sha256:54ac58d3b89726f3050d650d47d6d7f20a6b524d739a9bc03f4d84d23f7a2b09 --raw |jq .mediaType
null
ipanova@puffy:/tmp$ skopeo inspect docker://quay.io/fedora/fedora-bootc@sha256:66f42c1cd2ab599ee0f53e940f8c2f05baa78bd6a2179a2f66a034749da8ed61 --raw |jq .mediaType
null
ipanova@puffy:/tmp$ skopeo inspect docker://quay.io/fedora/fedora-bootc@sha256:66f42c1cd2ab599ee0f53e940f8c2f05baa78bd6a2179a2f66a034749da8ed61 --raw |jq .config
{
  "digest": "sha256:2c63889a84890052ebf642498e8b01c86ab4a832e89870fd52d2ff221920a4d9",
  "mediaType": "application/vnd.oci.image.config.v1+json",
  "size": 10958
}
ipanova@puffy:/tmp$ 

If you read the specs you will see that mediaType field is not required.

The changelog message needs to be re-written.

@git-hyagi git-hyagi dismissed stale reviews from mdellweg and lubosmj via fb3b019 August 26, 2024 11:22
@git-hyagi git-hyagi force-pushed the mediatype-sync-issue branch from c389406 to fb3b019 Compare August 26, 2024 11:22
@git-hyagi git-hyagi changed the title Fix a syncing content error with old manifests Fix a sync error with manifests without mediaType Aug 26, 2024
@ipanova ipanova merged commit d9ee026 into pulp:main Aug 27, 2024
12 checks passed
@git-hyagi git-hyagi deleted the mediatype-sync-issue branch August 27, 2024 11:14
Copy link

patchback bot commented Aug 27, 2024

Backport to 2.20: 💚 backport PR created

✅ Backport PR branch: patchback/backports/2.20/d9ee026fa71ea1b6538b25ccaf63f120c88fd273/pr-1747

Backported as #1748

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syncing fedora/fedora-bootc fails
4 participants