Merge ~stub/layer-snap/+git/layer-snap-stub:no-snap-proxy into ~stub/layer-snap:master

Proposed by Stuart Bishop
Status: Merged
Merged at revision: 2d16a6810b124648ff53b1fdd138a490fa4efdef
Proposed branch: ~stub/layer-snap/+git/layer-snap-stub:no-snap-proxy
Merge into: ~stub/layer-snap:master
Diff against target: 63 lines (+27/-13)
2 files modified
config.yaml (+15/-12)
reactive/snap.py (+12/-1)
Reviewer Review Type Date Requested Status
Michał Ajduk (community) Approve
Stuart Bishop Pending
Review via email: mp+394665@code.staging.launchpad.net

Commit message

Remove snap proxy config, preserve Juju snap proxy config

Removes the snap proxy config items, deprecated in favour of using
Juju model configuration. Charmers can manually add them back if
necessary, such as maintaining old charms in old Juju deployments.

Avoid erasing snap proxy information set by Juju, unless we are
sure the charm snap proxy config has actually been changed and
the operator is trying to clear the settings.

To post a comment you must log in.
Revision history for this message
Michał Ajduk (majduk) :
review: Approve
Revision history for this message
Simon Fels (morphis) wrote :

This makes layer-snap break on our end with

[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install Traceback (most recent call last):
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install File "/var/lib/juju/agents/unit-lxd-0/charm/hooks/install", line 22, in <module>
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install main()
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install File "/var/lib/juju/agents/unit-lxd-0/.venv/lib/python3.6/site-packages/charms/reactive/__init__.py", line 73, in main
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install hookenv._run_atstart()
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install File "/var/lib/juju/agents/unit-lxd-0/.venv/lib/python3.6/site-packages/charmhelpers/core/hookenv.py", line 1334, in _run_atstart
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install callback(*args, **kwargs)
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install File "/var/lib/juju/agents/unit-lxd-0/charm/reactive/snap.py", line 192, in update_snap_proxy
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install proxy = proxy_settings()
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install File "/var/lib/juju/agents/unit-lxd-0/charm/reactive/snap.py", line 174, in proxy_settings
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install snap_proxy = hookenv.config()['snap_proxy']
[2020-12-14T11:53:09.929Z] unit-lxd-0: 10:25:38 WARNING unit.lxd/0.install KeyError: 'snap_proxy'

I see why the config item is dropped but then we should also drop it from https://git.launchpad.net/layer-snap/tree/reactive/snap.py#n174 to not cause the exception above.

Revision history for this message
Stuart Bishop (stub) wrote :

(a fix for the above bug was pushed out)

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: