Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: The default value for deploy's num_units is incompatible with subordiante charms #813

Open
sed-i opened this issue Mar 9, 2023 · 1 comment
Labels
wishlisted requested feature

Comments

@sed-i
Copy link
Contributor

sed-i commented Mar 9, 2023

Description

When deploying a subordinate charm without providing the num_units arg,

juju.errors.JujuError: ['subordinate application must be deployed without units']

It could be nicer if the default value was None, and then internally set to 0 in case of a subordinate charm (set to 1 otherwise).

python-libjuju/juju/model.py

Lines 1723 to 1727 in f52ca42

is_sub = await self.charmhub.is_subordinate(url.name)
if is_sub:
if num_units > 1:
raise JujuError("cannot use num_units with subordinate application")
num_units = 0

Urgency

Casually wishlisting

Code I'd Like to Run

await ops_test.model.deploy(grafana_agent_charm, application_name=agent.name, series="jammy")
# without num_units=0
@sed-i sed-i added the wishlisted requested feature label Mar 9, 2023
@github-actions
Copy link

This issue is marked as incomplete because it has been open 30 days with no activity. Please remove incomplete label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the incomplete old issue, check if it's still valid label Jul 23, 2023
@cderici cderici removed the incomplete old issue, check if it's still valid label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wishlisted requested feature
Projects
None yet
Development

No branches or pull requests

2 participants