You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The produced charm file will have different config.yaml than what was build using charmcraft 2
diff charmcraft2/config.yaml charmcraft3/config.yaml 1,47c1,8< # Copyright 2016 Canonical Ltd.< #< # This file is part of the Snap layer for Juju.< #< # Licensed under the Apache License, Version 2.0 (the "License");< # you may not use this file except in compliance with the License.< # You may obtain a copy of the License at< #< # http://www.apache.org/licenses/LICENSE-2.0< #< # Unless required by applicable law or agreed to in writing, software< # distributed under the License is distributed on an "AS IS" BASIS,< # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.< # See the License for the specific language governing permissions and< # limitations under the License.< "options":< # snap_proxy and snap_proxy_url have been deprecated for some time.< # If your charm still needs them, add these config items manually< # to your charm's config.yaml.< # snap_proxy:< # description: >< # DEPRECATED. Use snap-http-proxy and snap-https-proxy model configuration settings.< # HTTP/HTTPS web proxy for Snappy to use when accessing the snap store.< # type: string< # default: ""< # snap_proxy_url:< # default: ""< # type: string< # description: >< # DEPRECATED. Use snap-store-proxy model configuration setting.< # The address of a Snap Store Proxy to use for snaps e.g. http://snap-proxy.example.com< "snapd_refresh":< "default": ""< "type": "string"< "description": >< How often snapd handles updates for installed snaps. The default< (an empty string) is 4x per day. Set to "max" to check once per month< based on the charm deployment date. You may also set a custom string as< described in the 'refresh.timer' section here:< https://forum.snapcraft.io/t/system-options/87< "juju-channel":< "default": "2.9/stable"< "type": "string"< "description": |-< The channel of juju snap to install. Default to 2.9/stable.< Note: This value needs to be set at deployment time. Changes made< post-deployment will not be taken into effect.---> options:> juju-channel:> default: "2.9/stable"> type: string> description: |> The channel of juju snap to install. Default to 2.9/stable.> Note: This value needs to be set at deployment time. Changes made> post-deployment will not be taken into effect.
\ No newline at end of file
The difference in the config.yaml causes error during the installation of the charm
unit-juju-local-0: 2025-02-24 06:55:11 ERROR unit.juju-local/0.juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-juju-local-0/.venv/lib/python3.10/site-packages/charms/reactive/__init__.py", line 74, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-juju-local-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 390, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-juju-local-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 359, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-juju-local-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 181, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-juju-local-0/charm/reactive/snap.py", line 345, in change_snapd_refresh
timer = hookenv.config()["snapd_refresh"]
KeyError: 'snapd_refresh'
unit-juju-local-0: 2025-02-24 06:55:11 ERROR unit.juju-local/0.juju-log Hook error:
Traceback (most recent call last):
File "/var/lib/juju/agents/unit-juju-local-0/.venv/lib/python3.10/site-packages/charms/reactive/__init__.py", line 74, in main
bus.dispatch(restricted=restricted_mode)
File "/var/lib/juju/agents/unit-juju-local-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 390, in dispatch
_invoke(other_handlers)
File "/var/lib/juju/agents/unit-juju-local-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 359, in _invoke
handler.invoke()
File "/var/lib/juju/agents/unit-juju-local-0/.venv/lib/python3.10/site-packages/charms/reactive/bus.py", line 181, in invoke
self._action(*args)
File "/var/lib/juju/agents/unit-juju-local-0/charm/reactive/snap.py", line 345, in change_snapd_refresh
timer = hookenv.config()["snapd_refresh"]
KeyError: 'snapd_refresh'
The text was updated successfully, but these errors were encountered:
Bug Description
Take https://github.com/canonical/charm-juju-local for example, after updating the
charmcraft.yaml
to the syntax to whatcharmcraft 3
supports:The produced charm file will have different
config.yaml
than what was build usingcharmcraft 2
The difference in the
config.yaml
causes error during the installation of the charmTo Reproduce
git clone https://github.com/canonical/charm-juju-local
charmcraft.yaml
as the following (see below) . Then ,use charmcraft 3 (3.x/stable) to pack the charm, and unzip the charm file.config.yaml
between the two buildsEnvironment
charmcraft.yaml
Relevant log output
The text was updated successfully, but these errors were encountered: