GoogleContainerTools / GoogleContainerTools/jib

Expose mediaType in ContentDescriptorTemplate

Open
#4,498 0 comments 2 reactions 0 assignees View on GitHub
priority: p3 type:bug
Dominant language
Java
Stars
14.5k
Forks
1.5k
PR merge metrics
No merged PRs in 30d

Description

## Description

`BuildableManifestTemplate.ContentDescriptorTemplate` contains a `mediaType`
field that is parsed from JSON, but it is not exposed via a public getter.

At the same time, other descriptor fields such as `digest`, `size`, `urls`,
and `annotations` are accessible through public methods.

## Problem

This makes it difficult to work with descriptor media types without using
reflection, especially when dealing with OCI artifacts.

## Use case

When processing OCI manifests, it is often necessary to inspect layer
descriptors and select layers based on their media type.

For example, when working with Helm charts stored as OCI artifacts, the layer
can be identified via: `application/vnd.cncf.helm.chart.content.v1.tar+gzip`

Without a getter, accessing this requires reflection on internal fields.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.