Skip to content

Test: Fix remaining retry#1141

Merged
roosterfish merged 4 commits intocanonical:mainfrom
roosterfish:fix_remaining_retry
Dec 12, 2025
Merged

Test: Fix remaining retry#1141
roosterfish merged 4 commits intocanonical:mainfrom
roosterfish:fix_remaining_retry

Conversation

@roosterfish
Copy link
Contributor

Just found two more snap installs in our custom system-test GH action. One of them just recently failed here during install: https://github.com/canonical/microcloud/actions/runs/20171402120/job/57908105443?pr=1132.

To reuse the same retry func, I am sourcing the respective file.

The PR also addresses the comments in #1140.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances test reliability by adding retry mechanisms to snap installations in GitHub Actions and standardizing IPv6 configuration commands. The changes address recent installation failures and implement feedback from PR #1140.

  • Wraps snap install commands in GitHub Actions with retry logic to handle transient network failures
  • Replaces shell-based IPv6 disabling (echo 1 > /proc/sys/net/...) with sysctl commands
  • Moves yq installation from snap to apt-get for consistency and reliability

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
test/suites/basic.sh Updates IPv6 disable commands to use sysctl instead of shell redirects
test/includes/microcloud.sh Updates IPv6 disable commands across reset_system and restore_system functions; moves yq from snap to apt installation
.github/actions/system-test/action.yml Sources retry function and wraps lxd and terraform snap installations with retry logic

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
@roosterfish roosterfish marked this pull request as ready for review December 12, 2025 17:22
retry lxc exec "${name}" -- apt-get update
if [ -n "${CLOUD_INSPECT:-}" ] || [ "${SNAPSHOT_RESTORE}" = 0 ]; then
retry lxc exec "${name}" -- apt-get install --no-install-recommends -y jq zfsutils-linux htop
packages+=" zfsutils-linux htop"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've never used htop, IIRC it was Max's preference over the regular top. I wouldn't mind dropping it at one point.

Copy link
Contributor Author

@roosterfish roosterfish Dec 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noted. I was wondering why it's installed there if
[ -n "${CLOUD_INSPECT:-}" ] || [ "${SNAPSHOT_RESTORE}" = 0 ].
So it's just there for debugging purposes in case you manually run with CLOUD_INSPECT=1?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep

@roosterfish roosterfish merged commit 1817b57 into canonical:main Dec 12, 2025
30 checks passed
@roosterfish roosterfish deleted the fix_remaining_retry branch December 12, 2025 18:58
@roosterfish roosterfish mentioned this pull request Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants