-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: lake: cloud release build output fixes & related touchups (#4220)
Fixes two output bugs with cloud releases: (1) the fetch as part of an `extraDep` was not properly isolated in a job, and (2) the release job would be shown even if the release had already been successfully fetched. Also includes some related touchups, including the addition of show all jobs on `-v` which helps with debugging job counts. (cherry picked from commit 6171070)
- Loading branch information
Showing
9 changed files
with
73 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
rm -rf .lake lake-manifest.json | ||
rm -rf .lake lake-manifest.json dep/.lake dep/.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ open Lake DSL | |
|
||
package test | ||
require dep from "dep" | ||
|
||
lean_lib Test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,18 +12,58 @@ LAKE=${LAKE:-../../.lake/build/bin/lake} | |
# Test that a direct invocation fo `lake build *:release` fails | ||
($LAKE build dep:release && exit 1 || true) | diff -u --strip-trailing-cr <(cat << 'EOF' | ||
✖ [1/1] Fetching dep:release | ||
info: dep: wanted prebuilt release, but could not find an associated tag for the package's revision | ||
info: dep: wanted prebuilt release, but no tag found for revision | ||
error: failed to fetch cloud release | ||
Some builds logged failures: | ||
- dep:release | ||
EOF | ||
) - | ||
|
||
# Test that an indirect fetch on the release does not cause the build to fail | ||
$LAKE build -v test:extraDep | diff -u --strip-trailing-cr <(cat << 'EOF' | ||
⚠ [1/1] Fetched test:extraDep | ||
info: dep: wanted prebuilt release, but could not find an associated tag for the package's revision | ||
$LAKE build Test | diff -u --strip-trailing-cr <(cat << 'EOF' | ||
⚠ [1/3] Fetched dep:optRelease | ||
info: dep: wanted prebuilt release, but no tag found for revision | ||
warning: failed to fetch cloud release; falling back to local build | ||
✔ [2/3] Built Test | ||
Build completed successfully. | ||
EOF | ||
) - | ||
|
||
# Since committing a Git repository to a Git repository is not well-supported, | ||
# We reinitialize the bar repository on each test. This requires updating the | ||
# locked manifest to the new hash to ensure things work properly. | ||
pushd dep | ||
git init | ||
git checkout -b master | ||
git config user.name test | ||
git config user.email [email protected] | ||
git add --all | ||
git commit -m "initial commit" | ||
git tag release | ||
popd | ||
|
||
# Test download failure | ||
($LAKE build dep:release && exit 1 || true) | grep --color "downloading" | ||
|
||
# Test unpacking | ||
mkdir -p dep/.lake/build | ||
tar -cz -f dep/.lake/release.tgz -C dep/.lake/build . | ||
echo 4225503363911572621 > dep/.lake/release.tgz.trace | ||
rmdir dep/.lake/build | ||
$LAKE build dep:release -v | grep --color "unpacking" | ||
test -d dep/.lake/build | ||
|
||
# Test that the job prints nothing if the archive is already fetched and unpacked | ||
$LAKE build dep:release | diff -u --strip-trailing-cr <(cat << 'EOF' | ||
Build completed successfully. | ||
EOF | ||
) - | ||
|
||
# Test that releases do not contaminate downstream jobs | ||
$LAKE build Test | diff -u --strip-trailing-cr <(cat << 'EOF' | ||
Build completed successfully. | ||
EOF | ||
) - | ||
|
||
# Cleanup git repo | ||
rm -rf dep/.git |