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

[LP#2047967] Require the upgrade-action when changing the snap channel #11

Merged
merged 5 commits into from
Jan 4, 2024

Conversation

addyess
Copy link
Member

@addyess addyess commented Jan 3, 2024

LP#2047967

In an effort to require an upgrade action when the snap channel changes to something different from the currently running snaps, notify the user of a necessary change.

As a drive-by -- prevent users from selecting a snap channel that doesn't exist for any of the required snaps

New features

  1. changing the channel config to a different channel causes the charm to test each snap for a revision in the specified channel
  2. If each snap has a revision, it will test it the maj.min versions will change -- if so it blocks for an upgrade
  3. Whether a downgrade or an upgrade -- the charm will block waiting for the upgrade action to run

Possible issues:
switch from maj.min/edge to maj.min/stable could result in a downgrade without a charm upgrade action

  • this is because there could be a snap revision but the maj.min are the same, so the charm doesn't block waiting on a charm action. Perhaps this is okay since they are within the same channel??

@addyess addyess added the bug Something isn't working label Jan 3, 2024
mateoflorido
mateoflorido previously approved these changes Jan 3, 2024
Copy link
Member

@mateoflorido mateoflorido left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple nits:

charms/kubernetes_snaps.py Outdated Show resolved Hide resolved
charms/kubernetes_snaps.py Outdated Show resolved Hide resolved
@addyess addyess force-pushed the bug/lp2047967/require-snap-upgrade-on-channel-change branch from fa70e87 to e4af958 Compare January 4, 2024 14:16
@addyess addyess merged commit 56375f5 into main Jan 4, 2024
6 checks passed
@addyess addyess deleted the bug/lp2047967/require-snap-upgrade-on-channel-change branch January 4, 2024 14:18
addyess added a commit that referenced this pull request Jan 4, 2024
#11)

* Require the upgrade-action when changing the snap channel

* parse snap info as yaml

* remove unnecessary bytes decode

* handle situation where snap is missing channels info

* Address review comments
kwmonroe pushed a commit that referenced this pull request Jan 5, 2024
#11) (#12)

* Require the upgrade-action when changing the snap channel

* parse snap info as yaml

* remove unnecessary bytes decode

* handle situation where snap is missing channels info

* Address review comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

2 participants