Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

MediaTypeArtifactManifest not found in v2 #495

Closed
yuseferi opened this issue May 2, 2023 · 6 comments · Fixed by #496
Closed

MediaTypeArtifactManifest not found in v2 #495

yuseferi opened this issue May 2, 2023 · 6 comments · Fixed by #496

Comments

@yuseferi
Copy link

yuseferi commented May 2, 2023

Hi there,
After updating to V2, linter failed with

    golangci-lint run ./...        
WARN [runner] Can't run linter goanalysis_metalinter: buildir: failed to load package descriptor: could not load export data: no export data for "oras.land/oras-go/v2/internal/descriptor" 
ERRO Running error: 1 error occurred:
        * can't run linter goanalysis_metalinter: buildir: failed to load package descriptor: could not load export data: no export data for "oras.land/oras-go/v2/internal/descriptor"

after dig into the code, I noticed this const ( MediaTypeArtifactManifest) has not been set in the code.

@ARolek
Copy link

ARolek commented May 3, 2023

We're also running into this via Open Policy Agent. Looks like that's your problem as well @yuseferi. open-policy-agent/opa#5769 (comment)

@Wwwsylvia
Copy link
Member

Do you mean application/vnd.oci.artifact.manifest.v1+json or application/vnd.cncf.oras.artifact.manifest.v1+json?

@yuseferi
Copy link
Author

yuseferi commented May 4, 2023

Hey @Wwwsylvia ,
if it's depreciated so the usage of the cost should be removed too. there are lots of them, please search for it in your the codebase.

Best

@shizhMSFT
Copy link
Contributor

@yuseferi As mentioned by @Wwwsylvia ans as stated on #494, there is a breaking change in the latest image-spec v1.1.0-rc.3 that the symbol MediaTypeArtifactManifest has been removed. We are discussing how to resolve that accordingly.

@yuseferi
Copy link
Author

yuseferi commented May 4, 2023

Thank you @shizhMSFT , this issue is breaking lots of projects that are using this package indirectly. mostly https://github.com/open-policy-agent/opa project. that would be nice to decide about it a bit faster or revert the changes.
Best.

@shizhMSFT
Copy link
Contributor

The changes are in the OCI image-spec repository and thus the ORAS community are not able to revert the changes.

As a solution, I've sent a PR #496 to resolve the compiling error due the missing symbol MediaTypeArtifactManifest.

shizhMSFT added a commit that referenced this issue May 4, 2023
This PR fixes and only fixes the compiling errors due to the breaking
changes introduced by `image-spec v1.1.0-rc.3` where the artifact
manifest related specs are removed.

Fix #495.
Fix partially #494

---------

Signed-off-by: Shiwei Zhang <shizh@microsoft.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants