You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We does accept OCI manifest and read it into OCIManifestTemplate in memory.
ManifestPuller
if (schemaVersion == 2) {
// 'schemaVersion' of 2 can be either Docker V2.2 or OCI.StringmediaType = node.get("mediaType").asText();
...
if (OCIManifestTemplate.MANIFEST_MEDIA_TYPE.equals(mediaType)) {
returnmanifestTemplateClass.cast(
JsonTemplateMapper.readJson(jsonString, OCIManifestTemplate.class));
}
readJson() above returns an OCIManifestTemplate object (which is cast into the super ManifestTemplate by .cast()).
But, when we re-cast the in-memory object, we case it into either V21ManifestTemplate or V22ManifestTemplate.
PullBaseImageStep
ManifestTemplatemanifestTemplate =
registryClient.pullManifest(buildConfiguration.getBaseImageConfiguration().getImageTag());
// TODO: Make schema version be enum.switch (manifestTemplate.getSchemaVersion()) {
case1:
V21ManifestTemplatev21ManifestTemplate = (V21ManifestTemplate) manifestTemplate;
...
case2:
V22ManifestTemplatev22ManifestTemplate = (V22ManifestTemplate) manifestTemplate;
...
So although I haven't tested myself, I think Jib will throw class cast exception.
Also, we should have a "default" case in the above switch.
The text was updated successfully, but these errors were encountered:
We does accept OCI manifest and read it into
OCIManifestTemplate
in memory.ManifestPuller
readJson()
above returns anOCIManifestTemplate
object (which is cast into the superManifestTemplate
by.cast()
).But, when we re-cast the in-memory object, we case it into either
V21ManifestTemplate
orV22ManifestTemplate
.PullBaseImageStep
So although I haven't tested myself, I think Jib will throw class cast exception.
Also, we should have a "default" case in the above switch.
The text was updated successfully, but these errors were encountered: