-
Notifications
You must be signed in to change notification settings - Fork 692
Need a way to add tags to container layers targets. #764
Comments
Hi @atchouprakov, |
This will be fixed in Bazel 1.0, just add a flag |
@ishikhman I tried using Is this expected? I tested with Bazel 1.0.0, 1.0.1 and 1.1.0. CC @nlopezgi |
Hi @sha1n , |
@nlopezgi I'm pretty sure the Line 24 in a98bc3b
and here: Line 37 in a98bc3b
That file is a part of this repo, so I believe it's not really a part of the bigger skylib. I saw these downloading both in the terminal and I also ran bazel with Let me know if you want me to collect more info. |
I'm not sure why those would not respect tags. We can either try to pass tags explicitly (I'll be happy to review a PR you send to do so), or you can open up an issue in bazel repo to try to figure out why thse actions in particular are not working as others with the latest version of Bazel. |
I wouldn't mind sending a PR or comment on bazelbuild/bazel#8830, but I would love to hear what @ishikhman has to say. Just to make sure we're not missing anything. |
me neither - it seems like a bug, or a case that we missed during implementation. @sha1n please do :) |
@ishikhman @nlopezgi I created a simple repository that contains a basic workspace and a readme that describes the issue and how to reproduce it. I included a chrome tracing profile I took on my machine with all the relevant details. You can check it out here: https://github.com/sha1n/docker-no-remote-cache-issue-repro @ishikhman I don't want to generate too much noise, so let me know if you want me to comment on bazelbuild/bazel#8830 as well. Thanks! |
Hi @sha1n , |
I just noticed this might be related to #1265. In both cases the behavior of the gzip actions is not the expected one. My running hypothesis is that |
btw |
oh, container_pull is a repo rule. I think that does not work with the tags mechanism at all. |
In any case, I created #1272 that should fix this for Starlark rules (not for repo rules). Please give it a try and see if that addresses your issue. |
Thanks @darl for spotting that! @nlopezgi if that's indeed the case, then this has nothing to do with bazelbuild/bazel#8830 and Regarding #1272, what kind of test would you like me to run? It seems that tagging with For the sake of sharing, my current workaround is to use Thank you guys! |
Ideally, with #1272, you should be able to set the |
@nlopezgi, sorry for getting back to the original issue again, but after talking to a colleague who has much deeper knowledge in Bazel, I think I understand what needs to be done in order to solve my issue properly and I want to try and explain it here. According to my understanding, the In any case, I will try your patch and report back. Thanks! |
thanks for the additional exploration @sha1n , |
Thanks @nlopezgi. I tested with #1272 and created a separate branch on my repro repository with the relevant changes and an updated trace profile- it doesn't seem to work. The You can check it out here: https://github.com/sha1n/docker-no-remote-cache-issue-repro/tree/docker_rules_version_from_pr_1272 I'm not sure what you meant regarding |
Thanks for the additional exploration. It does seem then like we do need to have some way to pipe down the tags to the generated container_import target from container_pull. Happy to work with you to review a PR to enable this. |
Can this now be closed? |
We are adding
tags=["no-cache"]
to containers to avoid upload these to bazel remote cache. But we couldn't find a way to propagate tag to the layers targets.The text was updated successfully, but these errors were encountered: