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

CI always rebuilds sandbox root #172

Open
leoluk opened this issue Jan 31, 2023 · 0 comments
Open

CI always rebuilds sandbox root #172

leoluk opened this issue Jan 31, 2023 · 0 comments

Comments

@leoluk
Copy link
Member

leoluk commented Jan 31, 2023

When Jenkins cleans up the repo, it also deletes .bazeldnf and .bazelrc.sandbox, forcing the sandbox root to be rebuilt.

This is relatively fast - the RPMs are already cached and the --action_env stays the same, so nothing is invalidated - but it increases no-op CI time to 2m: https://jenkins.monogon.dev/blue/organizations/jenkins/gerrit-presubmit-monogon/detail/07%2F1107%2F1/1/pipeline

+ /home/ci/bazelisk test //...
cat: /home/ci/monogon/tools/../.bazelrc.sandbox: No such file or directory
Regenerating sysroot /home/ci/monogon/tools/../.bazeldnf/sandbox/default ...

Weirdly, it is then rebuilt again for the -c dbg run:

+ /home/ci/bazelisk test -c dbg //...
Regenerating sysroot /home/ci/monogon/tools/../.bazeldnf/sandbox/default ...

It's not clear whether re-using the sandboxroot is guaranteed to be safe (not sure if it's mounted r/o?). If it is, there's no point in clearing it. Perhaps it should be moved out of the repo to ~/.cache?

monogon-bot pushed a commit that referenced this issue Feb 2, 2023
This avoids recreating the sandbox on the second run on a clean
checkout. The file is autogenerated by tools/bazel, if the user
chooses to modify it manually, that's on them.

Should fix half of #172.

Change-Id: Id43d4c351f69c78ff7a4cd25b5bef84a632ff2b2
Reviewed-on: https://review.monogon.dev/c/monogon/+/1116
Reviewed-by: Lorenz Brun <[email protected]>
Tested-by: Jenkins CI
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

1 participant