-
Notifications
You must be signed in to change notification settings - Fork 542
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 remote cache miss #748
Conversation
In some cases, the hermetic python toolchain would generate .pyc files when being used, resulting in a remote cache miss. This commit excludes generated files from the "files" filegroup to resolve this issue
1e9a39f
to
d7bf5de
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Could you please clarify when the pyc's are generated. Is it during some build step of the hermetic interpreter external repo?
Please, see: #713. |
After reading #713, it seems that the issue shouldn’t occur if not building as root. I was indeed building as the root user “ContainerAdministrator” within a Windows Container. I’ll try building as non-root. Thanks! |
Cool! I'm working on a solution to warn the user about this. |
@f0rmiga This issue does indeed go away when building as non-root, however when building as non-root in a Windows Container, symlinks cannot be created, which prevents the usage of features like Lines 19 to 22 in aef17ad
Given this scenario, and perhaps others where it is troublesome to build as non-root, should we instead exclude the pyc files from the filegroup? |
Then, I guess we should exclude unconditionally under Windows only. Thanks for the extra info on Windows! |
Another thing we can add is an attribute to exclude them under Linux too. |
In some cases, the hermetic python toolchain would generate .pyc files
when being used, resulting in a remote cache miss. This commit excludes
generated files from the "files" filegroup to resolve this issue
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information