binary_distribution.py: list parent dirs in binary tarball#41773
binary_distribution.py: list parent dirs in binary tarball#41773haampie merged 8 commits intospack:developfrom
Conversation
389b940 to
bf1fa1b
Compare
|
We rebuilt the image with the updated spack and changed the padded length configuration. The container deployment is successful and awslambda got invoked. Thank you :) |
|
+1, this fixed our deployment! I have a follow up question about the padded length: why would you ever not use |
|
See the section about relocation for why to use a longer If the environment variables are still too big, you can disable some that aren't necessary. See the section about spack:
specs: [x, y, z]
modules:
# do not set default env variables (double colon is not a typo, it overrides the value)
prefix_inspections:: {}If you still end up with too many bytes of config, one thing I've been thinking about is to add one last layer to the container image with an environment view, so that all executables end up in |
alalazo
left a comment
There was a problem hiding this comment.
Only minor comments, but basically LGTM. Do we have a test ensuring that new Spack can still use layout version v1 ?
Add forward compatibility for tarballs created by Spack 0.22, which use build cache layout version 2. Spack 0.21 continues to produce build cache layout version 1 tarballs. Build cache layout version 2 also lists parent directories of the package prefix in the tarball, which is required for certain container runtimes.
Add forward compatibility for tarballs created by Spack 0.22, which use build cache layout version 2. Spack 0.21 continues to produce build cache layout version 1 tarballs. Build cache layout version 2 also lists parent directories of the package prefix in the tarball, which is required for certain container runtimes.
Add forward compatibility for tarballs created by Spack 0.22, which use build cache layout version 2. Spack 0.21 continues to produce build cache layout version 1 tarballs. Build cache layout version 2 also lists parent directories of the package prefix in the tarball, which is required for certain container runtimes.
Add forward compatibility for tarballs created by Spack 0.22, which use build cache layout version 2. Spack 0.21 continues to produce build cache layout version 1 tarballs. Build cache layout version 2 also lists parent directories of the package prefix in the tarball, which is required for certain container runtimes.
Add forward compatibility for tarballs created by Spack 0.22, which use build cache layout version 2. Spack 0.21 continues to produce build cache layout version 1 tarballs. Build cache layout version 2 also lists parent directories of the package prefix in the tarball, which is required for certain container runtimes.
Add forward compatibility for tarballs created by Spack 0.22, which use build cache layout version 2. Spack 0.21 continues to produce build cache layout version 1 tarballs. Build cache layout version 2 also lists parent directories of the package prefix in the tarball, which is required for certain container runtimes.
|
I went on vacation and only just read through this now. Thank you for the thorough explanation, and the changes make sense to me. We were able to get unstuck thanks to these fixes, so again I really appreciate your help! |
* Bump the build cache layout version from 1 to 2 * Version to lists parent directories of the prefix in the tarball too, which is required from some container runtimes
* Bump the build cache layout version from 1 to 2 * Version to lists parent directories of the prefix in the tarball too, which is required from some container runtimes
Add forward compatibility for tarballs created by Spack 0.22, which use build cache layout version 2. Spack 0.21 continues to produce build cache layout version 1 tarballs. Build cache layout version 2 also lists parent directories of the package prefix in the tarball, which is required for certain container runtimes.
* Bump the build cache layout version from 1 to 2 * Version to lists parent directories of the prefix in the tarball too, which is required from some container runtimes
Add forward compatibility for tarballs created by Spack 0.22, which use build cache layout version 2. Spack 0.21 continues to produce build cache layout version 1 tarballs. Build cache layout version 2 also lists parent directories of the package prefix in the tarball, which is required for certain container runtimes.
Previously the directory structure on the spack create tarballs were as follows:
With this PR, they look like this:
The reason for this change is that AWS lambda functions complain about missing
parent directories when giving them a Spack package as an OCI image layer.
Other container runtimes seem to have no issues with this.
Compatibility
Tarballs are backwards compatible, but not forwards compatible, because Spack 0.21
determines the package prefix as that prefix common to all tarfile entries -- so, that'd
be
pathin the example above instead ofpath/to/prefix.Instead of (or additionally to) bumping
CURRENT_BUILD_CACHE_LAYOUT_VERSIONI'malso happy to backport the search mechanism introduced in this PR, which is to compute
the root relative to the lowest-depth
.spack/binary_distributionfile.