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

Add import_tags attribute to oci_pull #573

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

steve-261370
Copy link
Contributor

Adds an import_tags attribute to the oci_pull macro to allow passing Bazel tags to the underlying rules. This implementation follows the naming and general implementation of the import_tags attribute on the old legacy container_pull rule.

#572

Adds an import_tags attribute to the oci_pull macro to allow passing
Bazel tags to the underlying rules. This implementation follows the
naming and general implementation of the import_tags attribute on the
old legacy container_pull rule.
@thesayyn
Copy link
Collaborator

the name import_tags is really confusing here. it's gonna be confused for Docker tags.

@thesayyn
Copy link
Collaborator

And i belive the the import is used here because rules_docker used a rule called container_import under the hood.

The previous name, import_tags, was copied over from how rules_docker
has it on the container_pull rule but this isn't the best name for the
oci_pull macro as pointed out in the issue comment:
bazel-contrib#573 (comment)

> thesayyn: the name import_tags is really confusing here. it's gonna be
> confused for Docker tags.

> thesayyn: And i belive the the `import` is used here because
> rules_docker used a rule called `container_import` under
> the hood.

So I change it to `bazel_tags` to indicate it is the bazel tags this is
modifying.
@steve-261370
Copy link
Contributor Author

ahh - good point. I made a change to rename import_tags to bazel_tags. If you had another suggestion on the name, let me know. Or if you come up with a better way to handle this.

oci/pull.bzl Outdated Show resolved Hide resolved
Steve Tan Nguyen added 2 commits May 30, 2024 18:18
On the oci_pull repository rule, the attribute passed in is renamed from
"tags" -> "bazel_tags" to avoid confusion with container/docker tags.

"bazel_tags" is now explicitly defined on the rule as an attribute.

For the oci_alias repository rule, I removed the passed in attribute
since it wasn't being used anywhere.
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.

3 participants