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

patch: Install lxd snap on runner #262

Merged
merged 3 commits into from
Jan 7, 2025
Merged

patch: Install lxd snap on runner #262

merged 3 commits into from
Jan 7, 2025

Conversation

carlcsaposs-canonical
Copy link
Contributor

ubuntu-24.04 image, unlike 22.04 image, does not have lxd snap pre-installed

e.g.

Ubuntu 22.04 GitHub runner

$ snap list
Name    Version        Rev    Tracking       Publisher   Notes
core20  20240705       2379   latest/stable  canonical✓  base
lxd     5.0.3-80aeff7  29351  5.0/stable/…   canonical✓  -
snapd   2.63           21759  latest/stable  canonical✓  snapd

Ubuntu 24.04 GitHub runner

$ snap list
No snaps are installed yet. Try 'snap install hello-world'.

ubuntu-24.04 image, unlike 22.04 image, does not have lxd snap pre-installed

e.g.

Ubuntu 22.04 GitHub runner
```
$ snap list
Name    Version        Rev    Tracking       Publisher   Notes
core20  20240705       2379   latest/stable  canonical✓  base
lxd     5.0.3-80aeff7  29351  5.0/stable/…   canonical✓  -
snapd   2.63           21759  latest/stable  canonical✓  snapd
```

Ubuntu 24.04 GitHub runner
```
$ snap list
No snaps are installed yet. Try 'snap install hello-world'.
```
@carlcsaposs-canonical
Copy link
Contributor Author

@carlcsaposs-canonical
Copy link
Contributor Author

carlcsaposs-canonical commented Jan 7, 2025

tested on canonical/mysql-operator#572

Copy link

@taurus-forever taurus-forever left a comment

Choose a reason for hiding this comment

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

Tnx!

Comment on lines +320 to 321
sudo snap install lxd --channel='${{ inputs.lxd-snap-channel }}'
sudo snap refresh lxd --channel='${{ inputs.lxd-snap-channel }}'

Choose a reason for hiding this comment

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

install+refresh is not optimal, but safe and fast. LGTM to unblock CI.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

what would you do instead?

snap doesn't provide a single command to install or refresh

imo checking if snap installed is more complicated and error-prone
and install command (currently) does not fail if snap already installed, so seems like the simplest solution

@carlcsaposs-canonical carlcsaposs-canonical merged commit 11c673f into main Jan 7, 2025
1 check passed
@carlcsaposs-canonical carlcsaposs-canonical deleted the snap-24 branch January 7, 2025 11:50
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