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

Published Bicep modules now include artifactType in the OCI manifest #9520

Merged
merged 1 commit into from
Jan 12, 2023

Conversation

majastrz
Copy link
Member

@majastrz majastrz commented Jan 12, 2023

There is a new field in the OCI manifest called artifactType that will help us support completions for modules published to container registries. From now on, Bicep will include that field in the OCI manifests we generate. I've also added tests to ensure that modules published by versions of Bicep that don't set artifactType will restore as before.

Reference to OCI spec: https://github.com/opencontainers/image-spec/blob/main/artifact.md

Microsoft Reviewers: Open in CodeFlow

@majastrz majastrz marked this pull request as ready for review January 12, 2023 03:33
@@ -56,7 +56,7 @@ public async Task<OciArtifactResult> PullArtifactAsync(RootConfiguration configu
return new OciArtifactResult(manifestDigest, manifest, manifestStream, moduleStream);
}

public async Task PushArtifactAsync(Configuration.RootConfiguration configuration, OciArtifactModuleReference moduleReference, StreamDescriptor config, params StreamDescriptor[] layers)
public async Task PushArtifactAsync(RootConfiguration configuration, OciArtifactModuleReference moduleReference, string? artifactType, StreamDescriptor config, params StreamDescriptor[] layers)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should artifactType be non-nullable here if all modules published with Bicep >= 0.14 will include it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I needed to push an artifact without artifactType in one of the tests I added to ensure we can successfully pull modules pushed by previous versions of Bicep (which won't have artifactType set).

@majastrz majastrz merged commit 11d8d19 into main Jan 12, 2023
@majastrz majastrz deleted the majastrz/artifact-type branch January 12, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants