-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
--experimental_remote_download_regex
doesn't work with a cache in 6.0.0rc4
#16922
Comments
@bazel-io fork 6.0.0 |
I assume this is also reproducible with 6.0.0rc4? |
@meteorcloudy Looks like it from my tests. |
@BalestraPatrick Thanks, @coeuvre is on it now |
I can reproduce this error with @BalestraPatrick Can you double check whether it is still the case for |
|
--experimental_remote_download_regex
doesn't work with --disk_cache
in 6.0.0--experimental_remote_download_regex
doesn't work with --disk_cache
in 6.0.0rc2
@BalestraPatrick Can you help confirm this? Maybe we'll be able to release 6.0 on time after all? |
Seems like this example is fixed by rc4, but his internal project is still broken on rc4. We are trying to adjust the repro to account for the remaining failure. |
I tried running |
Which version did you try with? IIUC, the issue was when we do an no-op incremental build, the content inside |
If you run the command inside |
The reason a following build didn't download the content from disk cache is because of action cache, the generating action didn't get chance to run, so the outputs are not downloaded. |
He did the clean targeting the nested output base as well, not just the runner. The new bug he is reporting is that even after an expunge of that output base the indexstore directories were coming up empty. |
Either way I think this exact bug is fixed. There might be another bug related to incremental state. |
@coeuvre Yeah, I was testing with |
Thanks for confirming the fix. Please create another issue to track the related bug. Closing this now. |
@BalestraPatrick Then we'll move forward with the 6.0 release, and if we identify the other potential incremental bug, we can fix it in later minor/patch releases. |
@meteorcloudy Patrick told me he repro'd this again with rc4. We are trying to get an example repro together. |
I repro'ed as well. Getting some steps together. Can we re-open the issue? |
I'm still trying to distill this down to something specific, but it's not limited to the disk cache, I've repro'ed with a remote cache as well. |
--experimental_remote_download_regex
doesn't work with --disk_cache
in 6.0.0rc2--experimental_remote_download_regex
doesn't work with a cache in 6.0.0rc4
Repro steps:
The above uses Xcode for steps 6-12, since it's not dependent on Starlark Hash paths, but they can be replaced with this instead:
This repro uses the disk cache for ease of testing, but the bug applies to a remote cache as well. |
Thanks for the repro, i am looking into this issue. |
I found the root cause: we didn't match regex with the files inside tree artifact. Detailed explaination:
Working on the fix. |
It doesn't work when setting `--experimental_remote_download_regex` to match files inside tree artifact after bazelbuild@e01e7f5. This change fixes that. Fixes bazelbuild#16922. Closes bazelbuild#16949. PiperOrigin-RevId: 493838296 Change-Id: I6eceffbffce30949173d10120a9120c6c608a983
Description of the bug:
The flag
--experimental_remote_download_regex
which is used by some IDE integrations doesn't work with--disk_cache
and--remote_download_toplevel
in 6.0.0rc2. I was able to verify that the same behavior works great in 5.3.0, but suddenly broke sometime before 6.0.0rc2. I couldn't bisect exactly due to some breakages between Bazel and rules_apple, but I don't think there are many changes that could impact it.What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
This is a bit tricky to reproduce, but it goes as following:
cd examples/integration
and generate the project withbazelisk run //:xcodeproj-sim_arm64
.bazelisk run //:xcodeproj-sim_arm64 --cpu=ios_sim_arm64 -- --generator_output_groups=all_targets 'build --remote_download_toplevel --cpu=ios_sim_arm64 --apple_platform_type=ios --disk_cache=~/.test-cache'
(Xcode 14.0 might be required).iOSApp.swift
and make some modifications (simply modify the existingSwift.print
statement). Run a no-op build as a test. This is because the errors in importing the indexstore (which is what we download through--remote_download_regex
) will show up only on the following build. Everything should work fine and no errors should be seen because the example project is using Bazel 5.3.0. You can verify that the indexstore has contents in something like/Users/you/src/rules_xcodeproj/examples/integration/bazel-output-base/rules_xcodeproj/build_output_base/execroot/__main__/bazel-out/ios-sim_arm64-min15.0-applebin_ios-ios_sim_arm64-dbg-ST-2ccbe0f541dd/bin/iOSApp/Source/iOSApp.library.indexstore/
..bazelversion
to 6.0.0rc2 (or likely earlier revisions will reproduce the issue too).indexstore
directory will contain the right files as expected. Then do a no-op build which will be fetched from the disk cache. If you now list the contents of the same directory as before, you'll see that theindexstore
directory is empty. Instead, it should contain actual files like the build with 5.3.0 or any other build that doesn't hit the disk cache.My assumption is that the values specified in
--remote_download_regex
(here) are not respected when an action is fetched from the disk cache. When the action is executed locally or fetched from a remote cache, everything seems to work as expected.Which operating system are you running Bazel on?
macOS 13.0
What is the output of
bazel info release
?No response
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.6.0.0rc2
What's the output of
git remote get-url origin; git rev-parse master; git rev-parse HEAD
?No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: