Skip to content

feat: install landscape-outbox snap#126

Merged
srunde3 merged 12 commits intocanonical:mainfrom
srunde3:lndeng-4341-install-outbox-snap
Apr 27, 2026
Merged

feat: install landscape-outbox snap#126
srunde3 merged 12 commits intocanonical:mainfrom
srunde3:lndeng-4341-install-outbox-snap

Conversation

@srunde3
Copy link
Copy Markdown
Collaborator

@srunde3 srunde3 commented Apr 26, 2026

Installs the landscape-outbox snap from the latest/edge channel. If the config is updated, the charm refreshes the snap to the specified channel.

This is covered by an integration test that verifies that the snap is installed and active. If you want to run the integration test (and test manually with the deployed model), use the legacy bundle and set the PPA to the beta. Then you can test like so:

LANDSCAPE_CHARM_USE_HOST_JUJU_MODEL=1 uv run --group integration pytest -v -s tests/integration/test_bundle.py::test_outbox_snap_installed

Before making a stable release of the charm, we'll need to get the outbox into latest/stable as well so that the charm can default to that channel instead of edge. This should be possible within this week; I'll take care of updating the charm.

@srunde3 srunde3 marked this pull request as draft April 26, 2026 22:54
@srunde3 srunde3 marked this pull request as ready for review April 26, 2026 23:59
@jmucc jmucc requested a review from Copilot April 27, 2026 16:15
@jmucc jmucc self-requested a review April 27, 2026 16:16
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Installs and manages the landscape-outbox snap (defaulting to latest/edge) and adds coverage to ensure the snap is installed, active, and refreshed on config changes.

Changes:

  • Add charmlibs-snap dependency to support snap install/refresh operations from the charm.
  • Install landscape-outbox during install and refresh/ensure it on config-changed based on outbox_snap_channel.
  • Add unit + integration tests validating installation, service activity, and failure behavior on invalid channels.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/charm.py Installs the snap on install, ensures/refreshes on config changes, and restarts the snap during service restart.
src/config.py Adds outbox_snap_channel to the validated charm configuration model.
config.yaml Introduces outbox_snap_channel config option (default latest/edge).
pyproject.toml Adds charmlibs-snap runtime dependency.
uv.lock Locks charmlibs-snap and updates project dependency metadata.
tests/unit/conftest.py Adds a snap fixture to stub snap.add/snap.ensure in unit tests.
tests/unit/test_charm.py Adds unit tests for snap ensure/install behavior and failure handling.
tests/integration/test_bundle.py Adds integration test validating the snap is installed, active, and channel refresh failure is surfaced.

Comment thread tests/integration/test_bundle.py Outdated
Copy link
Copy Markdown

@jmucc jmucc left a comment

Choose a reason for hiding this comment

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

Should we also stop and start the outbox in the pause and resume actions? I tried manual testing against the legacy-db.bundle.yaml but the relations weren't accurate. I ran a model from bundle.yaml instead and I manaully verified the steps in the integration test work.

Comment thread tests/unit/test_charm.py
Comment thread src/config.py
@srunde3
Copy link
Copy Markdown
Collaborator Author

srunde3 commented Apr 27, 2026

@jmucc yes, good catch. We should start/stop with the pause action too. I'll update.

@srunde3 srunde3 force-pushed the lndeng-4341-install-outbox-snap branch from a22244d to 774f3a9 Compare April 27, 2026 18:37
Copy link
Copy Markdown

@jmucc jmucc left a comment

Choose a reason for hiding this comment

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

Manually verified pause/resume stop/starts the outbox. LGTM.

@srunde3 srunde3 merged commit 137d4f2 into canonical:main Apr 27, 2026
11 checks passed
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