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

Enter blocked status if resource and snap_channel #115

Merged
merged 4 commits into from
Oct 24, 2024

Conversation

samuelallan72
Copy link
Contributor

When a resource is used, the snap_channel config option is ignored. In this case, the snap is installed directly from the resource file, so a "channel" doesn't make sense.

If snap_channel is set and a resource is being used, it may indicate a confusion situation,
such as the user changing the snap_channel
and wondering why the snap isn't being updated.
So the charm can alert the user to this situation
via a message and blocked status.

Fixes: #113

When a resource is used, the `snap_channel` config option is ignored.
In this case, the snap is installed directly from the resource file,
so a "channel" doesn't make sense.

If `snap_channel` is set and a resource is being used,
it may indicate a confusion situation,
such as the user changing the `snap_channel`
and wondering why the snap isn't being updated.
So the charm can alert the user to this situation
via a message and blocked status.

Fixes: #113
@samuelallan72 samuelallan72 force-pushed the block-snap_channel_resource branch from b7c40db to 67fde95 Compare October 20, 2024 22:53
jneo8
jneo8 previously approved these changes Oct 21, 2024
Copy link
Contributor

@jneo8 jneo8 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@chanchiwai-ray chanchiwai-ray left a comment

Choose a reason for hiding this comment

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

Overall LGTM, only one small question

src/charm.py Show resolved Hide resolved
gabrielcocenza
gabrielcocenza previously approved these changes Oct 21, 2024
Copy link
Contributor

@chanchiwai-ray chanchiwai-ray left a comment

Choose a reason for hiding this comment

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

LGTM

@samuelallan72 samuelallan72 merged commit 038d81f into main Oct 24, 2024
3 checks passed
@samuelallan72 samuelallan72 deleted the block-snap_channel_resource branch October 24, 2024 01:17
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.

snap_channel should be empty if resource attached
4 participants