fix(snap): make url options consistent with landscape-config#430
Merged
wck0 merged 1 commit intocanonical:mainfrom Apr 20, 2026
Merged
fix(snap): make url options consistent with landscape-config#430wck0 merged 1 commit intocanonical:mainfrom
wck0 merged 1 commit intocanonical:mainfrom
Conversation
7970f8f to
5941516
Compare
5941516 to
1c57b31
Compare
1c57b31 to
c540e79
Compare
c540e79 to
49b7361
Compare
49b7361 to
936d01c
Compare
Contributor
|
The snap works as advertised. Reviewing the code now. |
wck0
approved these changes
Apr 17, 2026
Contributor
wck0
left a comment
There was a problem hiding this comment.
Changes look good, thanks!
One question about potentially logging a warning.
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.
Field reported that after running
snap set landscape-client ping-url=...and other keys, onlyping-urlremained visible insnap getafter restart with no configuration applied. Users naturally reach forurlandping-url, consistent withlandscape-client.conf, thelandscape-configCLI, and the snap's ownlandscape-client.config, but the hook only recognizedlandscape-urlandlandscape-ping-url, so those keys were never applied or cleared.Additionally, the hook appended
/message-systemand/pingto the URL internally, meaning users following any existing documentation (which mostly uses full URLs) would end up with doubled paths in the configuration.This PR renames the snap options to
urlandping-url, and removes the internal path appending so full URLs are passed through directly. The oldlandscape-urlandlandscape-ping-urlkeys are kept as deprecated aliases so existing setups continue to work.Related: canonical/landscape-documentation#192
1. After a fresh installation, the
default-configurehook works as expected:2. New
urlandping-urlkeys are applied and cleared:3. Legacy
landscape-url&landscape-ping-urlstill work:4. New key takes precedence over legacy key when both are set
5. Unknown key persists (documented behavior)
snapctl get(used inside the hooks) has no equivalent tosnap get -d landscape-clientthat returns the full config document, so the hook can only unset keys it recognizes. Unknown keys set by mistake will persist in snap options and have no effect. This behavior is now documented.