Add option to ignore errors when creating build caches for multiple packages at once#35601
Conversation
…/buildcache.py to enable building build caches for multiple packages without aborting after failures
c0d8402 to
4326b29
Compare
|
I don't think we want to drop Python cache files, it gives a speedup for users who don't have write permission to the spack store. |
But if I don't add this several more Python packages fail with |
|
Can you give an example for which that happens? |
Yup, I just started doing that (removing the code that removes the pycache and pyc files and rebuilding the entire build cache). This takes a while. |
|
Ok, I haven't seen this on Linux, so I wonder if relocation logic breaks python cache files on macOS |
Oh that's interesting, I just reran the build cache creation and the error I have been getting in the past with the bad marshal data is no longer there (cont'd below): My wild guess is that this is because we switched from using an external Python interpreter (homebrew) to letting spack build Python. I'll remove the lines dealing with the |
…reating build caches
…/buildcaches_skip_on_error_spack_authoritative
655979e to
3c009bf
Compare
|
@haampie How does this look to you know, without the Python-related changes? |
|
@haampie Friendly reminder about this PR. I'll update the documentation after we agree on the code changes. Thanks a lot! |
|
@haampie Friendly reminder to check out this PR if you have time, thank you! |
|
This used to pass all the CI tests, but now that it has aged I need to go in fix failing style tests. |
|
Sorry, I didn't get to this because in my opinion what you're catching is Spack bugs, so the flag might as well be I can understand you want a mode where Spack runs best effort; a single upload failure doesn't cause the rest to be skipped. But in that case I would still want an error exit code. Can you instead change the default to be best effort, and add a flag See also #36141 (comment) |
Thanks @haampie. To clarify, before I spend time developing in the wrong direction: Add an option I think that's great, because it makes I can work on this tomorrow if my summary is correct. |
|
Yes, exactly! 🙃 It'd be wise to work on top of #36141, you just need to add an additional catch all |
|
Turns out we don't need this anymore. The latest spack code (we pulled it into our fork) doesn't abort with an error (but spits out an error message) when creating a build cache package as part of a whole set of build cache packages fails. |
Description
Fixes #35602
Update
lib/spack/spack/binary_distribution.pyandlib/spack/spack/cmd/buildcache.pyto enable building build caches for multiple packages without aborting after failures.This is done by creating a new command line argument (boolean flag)
--skip-on-errorforspack buildcache create, which makesspackignore errors when creating the tarball (binary cache) for a specific package. The package is then "rolled back", i.e. it never ends up in the binary cache.The PR also removes the unused argument
allow_rootfrom subroutinerelocate_package.