Issue #4506: ignore unknown "artifactType" field in manifest descriptors#4509
Issue #4506: ignore unknown "artifactType" field in manifest descriptors#4509austek wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request adds the @JsonIgnoreProperties(ignoreUnknown = true) annotation to the ManifestDescriptorTemplate classes in both OciIndexTemplate and V22ManifestListTemplate. This ensures that unknown properties, such as the OCI 1.1 artifactType field, are ignored during JSON parsing instead of causing failures. Additionally, a new test case and test JSON files have been added to verify this behavior. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
@googlebot I signed it! |
…in manifest descriptors
bf22096 to
cf5c28c
Compare
|
Hope this can make it soon, thanks for the fix! 🙏 |
|
@diegomarquezp could this fix be reviewed and hopefully another releaseas for the plugins be tagged soon? Many thx! 🙏 |
cc: @whowes @jinseopkim0 |
Fixes #4506
Problem
Newer Docker (29.5.1) emits the OCI 1.1 optional
artifactTypefield on manifest descriptors in an image index. Jib does not model this field and the manifest descriptor templates were not marked to ignore unknown properties, so deserializing such a base (FROM) image's index/manifest-list fails:Fix
Add
@JsonIgnoreProperties(ignoreUnknown = true)to the manifest descriptor templates inOciIndexTemplateandV22ManifestListTemplate, matching the precedent already used elsewhere in the JSON templates (Platform,HistoryEntry,ContainerConfigurationTemplate, etc.).The descriptors in a base image's index are informational pointers Jib uses only to select the correct platform manifest, so ignoring unrecognized properties is the appropriate, forward-compatible behavior (it also covers other spec-defined descriptor fields such as
data).Tests
ociindex_artifacttype.jsonresource (mirroring the manifest in the issue) andOciIndexTemplateTest#testFromJsonWithUnknownProperties, asserting parsing succeeds and platform digests resolve.artifactTypeto an entry in the existingv22manifest_list.jsonsoV22ManifestListTemplateTestregression-covers the manifest-list case.