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

fixes for release pipeline (aarch64) #9481

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .expeditor/release_habitat.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ steps:
agents:
queue: default-privileged-aarch64
env:
HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/release_habitat/build_component.sh plan-build
Expand Down Expand Up @@ -162,7 +162,7 @@ steps:
agents:
queue: default-privileged-aarch64
env:
HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/release_habitat/build_component.sh backline
Expand Down Expand Up @@ -195,7 +195,7 @@ steps:
agents:
queue: default-privileged-aarch64
env:
HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/release_habitat/build_component.sh studio
Expand Down Expand Up @@ -242,7 +242,7 @@ steps:
agents:
queue: default-privileged-aarch64
env:
HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/release_habitat/build_component.sh launcher
Expand Down Expand Up @@ -284,7 +284,7 @@ steps:
agents:
queue: default-privileged-aarch64
env:
HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/release_habitat/build_component.sh sup
Expand Down Expand Up @@ -326,7 +326,7 @@ steps:
agents:
queue: default-privileged-aarch64
env:
HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/release_habitat/build_component.sh pkg-export-container
Expand Down Expand Up @@ -356,7 +356,7 @@ steps:
agents:
queue: default-privileged-aarch64
env:
HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/release_habitat/build_component.sh pkg-export-tar
Expand Down Expand Up @@ -422,7 +422,7 @@ steps:
agents:
queue: default-privileged-aarch64
env:
HAB_FALLBACK_CHANNEL: "LTS-2024"
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/release_habitat/package_and_upload_binary.sh
Expand Down
7 changes: 2 additions & 5 deletions .expeditor/scripts/verify/build_package-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -eou pipefail
package_path=${1?package_path argument required}

# Install hab from a temporarily uploaded aarch64 package
curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- -t "$BUILD_PKG_TARGET" -c "$HAB_FALLBACK_CHANNEL" -v 1.6.1178
curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- -t "$BUILD_PKG_TARGET"

# Since we are only verifying we don't have build failures, make everything
# temp!
Expand All @@ -19,12 +19,9 @@ HAB_CACHE_KEY_PATH="$JOB_TEMP_ROOT/keys"

export HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL
HAB_STUDIO_SECRET_HAB_FALLBACK_CHANNEL="$HAB_FALLBACK_CHANNEL"
export HAB_PREFER_LOCAL_CHEF_DEPS="true"
export HAB_PREFER_LOCAL_CHEF_DEPS="false"

echo "--- :key: Generating temporary origin key"
hab origin key generate "$HAB_ORIGIN"
echo "--- :hab: Running hab pkg build for $package_path"
# Install the temporarily built hab-studio.
# Once hab is released in the LTS channel, this step may no longer be required.
hab pkg install core/hab-studio -c "$HAB_FALLBACK_CHANNEL"
hab pkg build "$package_path"
2 changes: 1 addition & 1 deletion .expeditor/scripts/verify/run_cargo_test-aarch64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -eou pipefail

# Install hab from a temporarily uploaded aarch64 package
curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- -t aarch64-linux -c lts24-aarch64-linux -v 1.6.1178
curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | sudo bash -s -- -t aarch64-linux

# shellcheck source=.expeditor/scripts/shared.sh
source .expeditor/scripts/verify/shared.sh
Expand Down
18 changes: 9 additions & 9 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ steps:
HAB_LICENSE: "accept-no-persist"
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_REFRESH_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "lts24-aarch64-linux"
HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/verify/build_package-aarch64.sh test-services/test-probe
Expand Down Expand Up @@ -886,7 +886,7 @@ steps:
HAB_LICENSE: "accept-no-persist"
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_REFRESH_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "lts24-aarch64-linux"
HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/verify/build_package-aarch64.sh components/backline
Expand Down Expand Up @@ -915,7 +915,7 @@ steps:
HAB_LICENSE: "accept-no-persist"
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_REFRESH_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "lts24-aarch64-linux"
HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/verify/build_package-aarch64.sh components/hab
Expand Down Expand Up @@ -944,7 +944,7 @@ steps:
HAB_LICENSE: "accept-no-persist"
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_REFRESH_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "lts24-aarch64-linux"
HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/verify/build_package-aarch64.sh components/launcher
Expand Down Expand Up @@ -991,7 +991,7 @@ steps:
HAB_LICENSE: "accept-no-persist"
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_REFRESH_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "lts24-aarch64-linux"
HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/verify/build_package-aarch64.sh components/pkg-export-container
Expand Down Expand Up @@ -1020,7 +1020,7 @@ steps:
HAB_LICENSE: "accept-no-persist"
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_REFRESH_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "lts24-aarch64-linux"
HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/verify/build_package-aarch64.sh components/pkg-export-tar
Expand Down Expand Up @@ -1063,7 +1063,7 @@ steps:
HAB_LICENSE: "accept-no-persist"
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_REFRESH_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "lts24-aarch64-linux"
HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/verify/build_package-aarch64.sh components/plan-build
Expand Down Expand Up @@ -1092,7 +1092,7 @@ steps:
HAB_LICENSE: "accept-no-persist"
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_REFRESH_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "lts24-aarch64-linux"
HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/verify/build_package-aarch64.sh components/studio
Expand Down Expand Up @@ -1121,7 +1121,7 @@ steps:
HAB_LICENSE: "accept-no-persist"
HAB_BLDR_CHANNEL: "LTS-2024"
HAB_REFRESH_CHANNEL: "LTS-2024"
HAB_FALLBACK_CHANNEL: "lts24-aarch64-linux"
HAB_FALLBACK_CHANNEL: "stable"
BUILD_PKG_TARGET: "aarch64-linux"
command:
- sudo -E .expeditor/scripts/verify/build_package-aarch64.sh components/sup
Expand Down
31 changes: 23 additions & 8 deletions components/studio/bin/hab-studio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1055,15 +1055,30 @@ umount_fs() {
# Filesystem is confirmed umounted, return success
return 0
else
# TODO: The retry mechanism with an increasing delay has been added
# to address potential race conditions: if the `umount` operation
# is performed asynchronously, the filesystem might still be reported
# as mounted during the retries while the unmounting is in progress.
# By incrementally increasing the delay between retries (starting with
# a 5-second delay and increasing with each attempt), we aim to account
# for such races and give the system more time to process the unmount
# operation. This approach provides a balance between responsiveness
# and allowing sufficient time for the unmount process to complete.
# If this still impacts user experience, further adjustments such as
# dynamic retry intervals or enhanced detection mechanisms could be
# explored.
RETRY_DELAY=5
MAX_RETRIES=5
i=1
while [ "$i" -le "$MAX_RETRIES" ]
do
sleep $((RETRY_DELAY * i)) # Delay increases with each retry
if ! is_fs_mounted "$_mount_point"; then
return 0
fi
i=$((i+1))
done
# Despite a successful umount, filesystem is still mounted
#
# TODO fn: there may a race condition here: if the `umount` is
# performed asynchronously then it might still be reported as mounted
# when the umounting is still queued up. We're erring on the side of
# catching any possible races here to determine if there's a problem or
# not. If this unduly impacts user experience then an alternate
# approach is to wait/poll until the filesystem is unmounted (with a
# deadline to abort).
>&2 echo "After unmounting filesystem '$_mount_point', the mount \
persisted. Check that the filesystem is no longer in the mounted using \
\`mount(8)'and retry the last command."
Expand Down
Loading