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

snap: aware of channel in installed snaps #6435

Merged

Conversation

russoz
Copy link
Collaborator

@russoz russoz commented Apr 27, 2023

SUMMARY

Currently the snap module is not aware of the the snap channel when identifying installed snaps. This PR fixes that.

Fixes: #1606

ISSUE TYPE
  • Feature Pull Request
  • Test Pull Request
COMPONENT NAME

snap

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added WIP Work in progress feature This issue/PR relates to a feature request integration tests/integration module module needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI plugins plugin (any type) tests tests and removed needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI labels Apr 27, 2023
@felixfontein felixfontein added the check-before-release PR will be looked at again shortly before release and merged if possible. label Apr 28, 2023
@russoz russoz force-pushed the 1606-snap-channel branch from e473b94 to f9b98d3 Compare May 1, 2023 09:09
@ansibullbot ansibullbot added the needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html label May 8, 2023
@ansibullbot ansibullbot added the stale_ci CI is older than 7 days, rerun before merging label May 10, 2023
@Teebor-Choka
Copy link

This is a welcome approach, any progress?

@russoz russoz force-pushed the 1606-snap-channel branch from f9b98d3 to c8d58b0 Compare June 2, 2023 21:45
@russoz russoz force-pushed the 1606-snap-channel branch from c8d58b0 to 3ae95a3 Compare June 2, 2023 21:50
@ansibullbot ansibullbot removed needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html stale_ci CI is older than 7 days, rerun before merging labels Jun 2, 2023
@ansibullbot

This comment was marked as resolved.

@russoz
Copy link
Collaborator Author

russoz commented Jun 3, 2023

This is a welcome approach, any progress?

hi @Teebor-Choka I could not put much time on this in the last couple of weeks. Will try to work on it this weekend.

@ansibullbot ansibullbot added the module_utils module_utils label Jun 4, 2023
@russoz russoz changed the title [WIP] snap: aware of channel in installed snaps snap: aware of channel in installed snaps Jun 4, 2023
@russoz russoz requested a review from felixfontein June 4, 2023 23:33
@ansibullbot ansibullbot added needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed WIP Work in progress needs_ci This PR requires CI testing to be performed. Please close and re-open this PR to trigger CI needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR labels Jun 4, 2023
Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Looks good on a glance :) I've one small comment.

Also this needs a changelog fragment.

@russoz
Copy link
Collaborator Author

russoz commented Jun 6, 2023

@felixfontein you mentioned a small comment as well, but there was nothing here. Anyways, the changelog frag is already pushed.

Co-authored-by: Felix Fontein <[email protected]>
@felixfontein felixfontein merged commit b78d199 into ansible-collections:main Jun 6, 2023
@patchback
Copy link

patchback bot commented Jun 6, 2023

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/b78d1999e16075b15e4dd036fa432d24026b363b/pr-6435

Backported as #6630

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein removed the check-before-release PR will be looked at again shortly before release and merged if possible. label Jun 6, 2023
@felixfontein
Copy link
Collaborator

@russoz thanks!

patchback bot pushed a commit that referenced this pull request Jun 6, 2023
* [WIP] snap: aware of channel in installed snaps

* parse snap list output and assert whether channel matches

* undo test

* fail rightfully when install with different channel does not work

* transparetent refresh

* rollback comment in integration test

* rollback comment in integration test

* add changelog frag

* Update plugins/modules/snap.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit b78d199)
felixfontein pushed a commit that referenced this pull request Jun 6, 2023
…alled snaps (#6630)

snap: aware of channel in installed snaps (#6435)

* [WIP] snap: aware of channel in installed snaps

* parse snap list output and assert whether channel matches

* undo test

* fail rightfully when install with different channel does not work

* transparetent refresh

* rollback comment in integration test

* rollback comment in integration test

* add changelog frag

* Update plugins/modules/snap.py

Co-authored-by: Felix Fontein <[email protected]>

---------

Co-authored-by: Felix Fontein <[email protected]>
(cherry picked from commit b78d199)

Co-authored-by: Alexei Znamensky <[email protected]>
@russoz russoz deleted the 1606-snap-channel branch June 7, 2023 04:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request integration tests/integration module_utils module_utils module module plugins plugin (any type) tests tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snap module does not change channel if the snap is already installed
4 participants