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: Add new "Update bundle snaps" workflow #237

Closed
wants to merge 5 commits into from

Conversation

lucasgameiroborges
Copy link
Contributor

@lucasgameiroborges lucasgameiroborges commented Sep 30, 2024

New workflow for updating bundle snaps - can be made into an extra step in update_bundle.yaml if preferred, but should work fine as-is.

See custom run here: https://github.com/canonical/postgresql-bundle/actions/runs/11113889915
And resulting PR here: canonical/postgresql-bundle#200

juju exec --all --output snaps.txt -- snap list
cat ./snaps.txt
output_table=$(cat ./snaps.txt | awk '! /^[0-9]/ && $1 != "Name" { print $1, $3, $4 }' | sort | uniq)
canonical_livepatch=$(snap info canonical-livepatch | awk '/^channels:/ {found=1; next} found && $1 != "" {print $1, $4; exit}')
Copy link
Contributor Author

Choose a reason for hiding this comment

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

canonical-livepatch snap is not installed right-away on bundle deploy, but ubuntu-advantage charm may install it during execution, so we should have it on the list.

@lucasgameiroborges lucasgameiroborges marked this pull request as ready for review October 2, 2024 02:50
lucasgameiroborges added a commit that referenced this pull request Oct 8, 2024
This PR aims to condense both previous patches #237 and #235 in a
single, experimental `_update_bundle.yaml` workflow that will pin both
snap and rock resource versions, in accordance to what was previously
discussed:

- For rocks: Roughly follows John Meinel's proposed format, with `oci-*`
lines commented in order to preserve compatibility with `juju deploy`.
See the following PR commit:
canonical/postgresql-k8s-bundle@2683a2d
- For snaps: follows existing [store proxy
standard](https://documentation.ubuntu.com/snap-store-proxy/en/airgap-charmhub/#export-snap-resources).
See the following PR commit:
canonical/postgresql-bundle@b223dc3

See also test runs on:
- mysql bundle VM:
canonical/mysql-bundle@612d531
- mysql bundle K8s:
canonical/mysql-k8s-bundle@018fae7

Important info:
 - `storage-admin` currently has 2 blocking issues: 
- Pinning of charm revisions is being ignored:
https://bugs.launchpad.net/snapstore-client/+bug/2083876
- Charm resource (e.g. rocks) version pinning not supported:
https://bugs.launchpad.net/snapstore-client/+bug/2083878
- This is `amd64` only. An eventual patch for `arm64` should be
straightforward.
- This is specific to SQL bundles and their associated charms. This is
the case because snap pinning requires specific logic per-charm, see
point below.
- This fetches snap revisions by individual parsing of each charm's
source code (not by deploying the bundle, like on previous patch)

---------

Co-authored-by: Carl Csaposs <[email protected]>
@carlcsaposs-canonical carlcsaposs-canonical deleted the lucas/fetch-snap-rev branch February 10, 2025 08:35
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.

None yet

1 participant