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

fix: Use the right command to pull policies from oci registry #920

Merged
merged 1 commit into from
Feb 21, 2024

Conversation

gasparev
Copy link
Contributor

Fixes #919

@jalseth
Copy link
Member

jalseth commented Feb 17, 2024

Is this necessary? The CI attached to this PR works without the oci:// prefix.

@gasparev
Copy link
Contributor Author

Is this necessary? The CI attached to this PR works without the oci:// prefix.

It's needed to pull from the GCP Artifact Registry at least

@jpreese
Copy link
Member

jpreese commented Feb 20, 2024

When using push and pull the protocol doesn't have to be oci so it doesn't feel like putting it in the documentation is the right move. The protocol could also be https://, file://, etc.

What is an example from pulling from Google Artifact Registry? It may be an issue in how we are detecting the URL, e.g. https://github.com/open-policy-agent/conftest/blob/master/downloader/oci_detector.go#L31

@gasparev
Copy link
Contributor Author

When using push and pull the protocol doesn't have to be oci so it doesn't feel like putting it in the documentation is the right move. The protocol could also be https://, file://, etc.

What is an example from pulling from Google Artifact Registry? It may be an issue in how we are detecting the URL, e.g. https://github.com/open-policy-agent/conftest/blob/master/downloader/oci_detector.go#L31

That explains the issue I see. Host names for Artifact Registry Docker hosts end in -docker.pkg.dev.

Copy link
Member

@jalseth jalseth left a comment

Choose a reason for hiding this comment

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

Given this change is under an OCI heading in the docs, I'm OK with adding this if it means we aren't relying on regex for well-known artifact registries. Thanks for the PR!

@jalseth jalseth merged commit 3eb0cde into open-policy-agent:master Feb 21, 2024
7 checks passed
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.

Error in documentation for pulling OCI registry
3 participants