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

Fix snap autorefresh #524

Merged
merged 2 commits into from
Jan 13, 2025
Merged

Fix snap autorefresh #524

merged 2 commits into from
Jan 13, 2025

Conversation

javierdelapuente
Copy link
Contributor

@javierdelapuente javierdelapuente commented Jan 13, 2025

Applicable spec:

Overview

We are having failures in integration tests because snaps are refreshing automatically, see
https://github.com/canonical/github-runner-operator/actions/runs/12709354816/job/35506454388?pr=428

For example in the step Setup operator environment, the following error happens randomly:

Install LXD
  /usr/bin/sudo apt-get remove -qy lxd lxd-client
  Reading package lists...
  Building dependency tree...
  Reading state information...
  Package 'lxd' is not installed, so not removed
  E: Unable to locate package lxd-client
  /usr/bin/sudo snap list lxd
  Name  Version        Rev    Tracking      Publisher    Notes
  lxd   5.0.3-80aeff7  [29](https://github.com/canonical/github-runner-operator/actions/runs/12743097974/job/35512400072?pr=423#step:9:31)351  5.0/stable/…  canonical**  -
  /usr/bin/sudo snap install lxd --channel=latest/stable
  snap "lxd" is already installed, see 'snap help refresh'
  /usr/bin/sudo snap refresh lxd --channel=latest/stable
  error: snap "lxd" has "auto-refresh" change in progress
  /usr/bin/sudo snap refresh lxd --channel=latest/stable
  error: snap "lxd" has "auto-refresh" change in progress
  /usr/bin/sudo snap refresh lxd --channel=latest/stable
  error: snap "lxd" has "auto-refresh" change in progress
  /usr/bin/sudo snap refresh lxd --channel=latest/stable
  error: snap "lxd" has "auto-refresh" change in progress
  /usr/bin/sudo snap refresh lxd --channel=latest/stable
  error: snap "lxd" has "auto-refresh" change in progress
  Error: The process '/usr/bin/sudo' failed with exit code 10

Rationale

Workflow Changes

Disable autorefresh and wait for last auto refresh if there is one.

Checklist

  • The contributing guide was applied
  • The PR is tagged with appropriate label (urgent, trivial, complex)

Copy link
Contributor

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

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

simple enough change, one comment :) thanks

.github/workflows/integration_test_run.yaml Show resolved Hide resolved
Copy link
Collaborator

@swetha1654 swetha1654 left a comment

Choose a reason for hiding this comment

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

LGTM

@javierdelapuente javierdelapuente merged commit 0a03bc9 into main Jan 13, 2025
83 checks passed
@javierdelapuente javierdelapuente deleted the fix-snap-autorefresh branch January 13, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants