Skip to content

Fix series being required for local charms#504

Merged
jujubot merged 3 commits intomasterfrom
johnsca/lp-1929076/fix-series-metadata-v2
Jun 8, 2021
Merged

Fix series being required for local charms#504
jujubot merged 3 commits intomasterfrom
johnsca/lp-1929076/fix-series-metadata-v2

Conversation

@johnsca
Copy link
Copy Markdown
Contributor

@johnsca johnsca commented Jun 2, 2021

Local charms may no longer need a series if they are metadata v2 container charms. The Juju CLI uses the model default instead.

Fixes lp:1929076

Local charms may no longer need a series if they are metadata v2
container charms. The Juju CLI uses the model default instead.

Fixes [lp:1929076][]

[lp:1929076]: https://bugs.launchpad.net/juju/+bug/1929076
@johnsca
Copy link
Copy Markdown
Contributor Author

johnsca commented Jun 2, 2021

Testing with this got me the following, which I don't understand:

Traceback (most recent call last):
  File "/home/johnsca/juju/envs/dev/charms/kube-state-metrics/tests/integration/test_charm.py", line 16, in test_build_and_deploy
    await ops_test.model.deploy(
  File "/home/johnsca/juju/envs/dev/charms/kube-state-metrics/.tox/integration/lib/python3.8/site-packages/juju/model.py", line 1505, in deploy
    return await self._deploy(
  File "/home/johnsca/juju/envs/dev/charms/kube-state-metrics/.tox/integration/lib/python3.8/site-packages/juju/model.py", line 1659, in _deploy
    result = await app_facade.Deploy(applications=[app])
  File "/home/johnsca/juju/envs/dev/charms/kube-state-metrics/.tox/integration/lib/python3.8/site-packages/juju/client/facade.py", line 480, in wrapper
    reply = await f(*args, **kwargs)
  File "/home/johnsca/juju/envs/dev/charms/kube-state-metrics/.tox/integration/lib/python3.8/site-packages/juju/client/_client13.py", line 1102, in Deploy
    reply = await self.rpc(msg)
  File "/home/johnsca/juju/envs/dev/charms/kube-state-metrics/.tox/integration/lib/python3.8/site-packages/juju/client/facade.py", line 623, in rpc
    result = await self.connection.rpc(msg, encoder=TypeEncoder)
  File "/home/johnsca/juju/envs/dev/charms/kube-state-metrics/.tox/integration/lib/python3.8/site-packages/juju/client/connection.py", line 512, in rpc
    raise errors.JujuError(err_results)
juju.errors.JujuError: ['unknown option "max-status-history-size"']

The actual API call there is await app_facade.Deploy(applications=[app]) which doesn't reference that option at all, though it is set on the controller:

max-status-history-size            default     5G

@jameinel
Copy link
Copy Markdown
Member

jameinel commented Jun 2, 2021 via email

@jameinel
Copy link
Copy Markdown
Member

jameinel commented Jun 2, 2021 via email

@johnsca
Copy link
Copy Markdown
Contributor Author

johnsca commented Jun 3, 2021

@jameinel You're absolutely right. Thanks for the catch. It seems to be all working now.

@SimonRichardson
Copy link
Copy Markdown
Member

$$merge$$

@jujubot jujubot merged commit 81ea905 into master Jun 8, 2021
johnsca added a commit to charmed-kubernetes/kube-state-metrics-operator that referenced this pull request Jun 8, 2021
Since [libjuju #504][] was merged, switch libjuju to master branch until
next release. Also try removing setup-python step since `ubuntu-latest`
should now come with at least 3.8 anyway.

[libjuju #504]: juju/python-libjuju#504
johnsca added a commit to charmed-kubernetes/kube-state-metrics-operator that referenced this pull request Jun 8, 2021
Since [libjuju #504][] was merged, switch libjuju to master branch until
next release. Also try removing setup-python step since `ubuntu-latest`
should now come with at least 3.8 anyway.

[libjuju #504]: juju/python-libjuju#504
SimonRichardson added a commit to SimonRichardson/python-libjuju that referenced this pull request Jun 16, 2021
2.9.1
^^^^^

Wednesday June 16 2021

* Bug fix - Bundle Exposed endpoints missing juju#502
* Bug fix - Fix series requirement for local charms juju#504
* Add local charm update support juju#507
jujubot added a commit that referenced this pull request Jun 16, 2021
#508

2.9.1
^^^^^

Wednesday June 16 2021

* Bug fix - Bundle Exposed endpoints missing #502
* Bug fix - Fix series requirement for local charms #504
* Add local charm update support #507
@juanmanuel-tirado juanmanuel-tirado deleted the johnsca/lp-1929076/fix-series-metadata-v2 branch October 27, 2022 06:33
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.

4 participants