feat: support local landscape-server .deb via Juju resource - #129
Open
jansdhillon wants to merge 6 commits into
Open
feat: support local landscape-server .deb via Juju resource#129jansdhillon wants to merge 6 commits into
jansdhillon wants to merge 6 commits into
Conversation
Add a landscape-server-deb file resource. When attached, the charm installs it directly instead of pulling from the PPA. The PPA is still added first so all dependencies are available.
jansdhillon
commented
Apr 28, 2026
jansdhillon
commented
Apr 28, 2026
There was a problem hiding this comment.
Pull request overview
Adds support for installing landscape-server from an optional locally-provided .deb Juju resource, intended to bypass fetching the package from the Landscape PPA while still using the PPA for dependencies.
Changes:
- Add
landscape-server-debfile resource to charm metadata. - Update charm install logic to install from an attached
.debresource with--no-install-recommends. - Add/adjust unit and integration tests covering
.debresource behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/charm.py |
Adds resource fetch helper and conditional install-from-local-deb logic in the install hook. |
metadata.yaml |
Declares optional landscape-server-deb file resource. |
tests/unit/conftest.py |
Adds an empty_deb_resource fixture for scenario-based unit tests. |
tests/unit/test_charm.py |
Updates existing PPA tests and adds new unit tests for local-deb install behavior. |
tests/integration/test_bundle.py |
Adds an integration test that attaches the resource and expects the charm to install from it. |
- Switch to from pathlib import Path with real annotation - Use assert_any_call instead of brittle str(call) matching - Drop duplicate test, rename ppa-path test to reflect empty-resource fixture - Remove integration test (hard to revert, covered by unit tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a
landscape-server-debfile resource. When attached at deploy time, the charm installs it directly instead of pulling from the PPA. The PPA is still added first so all dependencies are available. Theupgradeaction also checks for the resource and installs from it when present.--no-install-recommendsis passed only whenmin_install=true. When no resource is attached the behaviour is unchanged.Manual testing
Download the deb to the repo root:
Temporarily add the resource to
bundle-examples/bundle.yaml. Also, add theself-hosted-dailyPPA since that's where we're pulling the deb from. The path is relative to the bundle file, so reference the deb from the repo root with../:Deploy:
Verify the local deb was installed: