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

File attributes like (executable bit) are not part of the cache digest #20148

Closed
nikhilkalige opened this issue Nov 10, 2023 · 2 comments
Closed

Comments

@nikhilkalige
Copy link
Contributor

nikhilkalige commented Nov 10, 2023

Description of the bug:

The cache entry doesn't account for the executable bits of the file, causing the cache poisoning.

Here's the scenario of what happened.

filegroup(scripts, srcs = ['a.sh'])
create_tarball(image, srcs = [scripts, more apps etc])
  • User created a.sh without +x, bazel build image, copied the tar to the system, realized a.sh is not executable.
  • User then chmod +x a.sh; bazel build image, copied the tar and saw that a.sh is still not an executable
  • User did bazel clean no change, bazel clean --expunge and they complained it's still not working

Since the image was cached in the first step, the change to the executable bit was not recognized the build.

Bazel version: release 7.0.0-pre.20230123.5- (@non-git)

Slack conversation, with the same information as above https://bazelbuild.slack.com/archives/CA31HN1T3/p1699596635216589

@benjaminp
Copy link
Collaborator

#3400

@nikhilkalige
Copy link
Contributor Author

@benjaminp Thank you.. Going to close this duplicate

@brentleyjones brentleyjones closed this as not planned Won't fix, can't repro, duplicate, stale Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants