Requesting docstring clarification on semantics of planned_units()
See original GitHub issueThe following things are not obvious from the docstring of the model.app.planned_units()
method
- Does planned unit apply to both scaling up and scaling down changes.
- Does planned unit reflect the state of juju command line issued uptil the point in time when planned units method was invoked.
For example suppose a charm has 30 deployed units and the system administrator invokes juju scale-application <charm> 1
. This will result in RelationDepartedEvents
for each of the 29 departing units. Will planned_units()
when invoked in all of those RelationDepartedEvents
yield the result 1 or will it yield 29, then 28 and so on.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Docstring Semantics - Docutils
PEP 257, Docstring Conventions, sketches out some guidelines, but does not get into methodology details. I haven't explored documentation methodology more ...
Read more >Introduction to docstring
2017-03-24. The docstring package is a package for R that provides the ability to display something analagous to Python's docstrings within R.
Read more >Documenting Python APIs with docstrings
We use reStructuredText to mark up and give semantic meaning to text in docstrings. ReStructuredText is lightweight enough to read in raw form, ......
Read more >Python Docstring: Documenting And Introspecting Functions
This tutorial explains what is Python Docstring and how to use it to document Python functions with examples.
Read more >PEP 257 – Docstring Conventions
This PEP documents the semantics and conventions associated with Python docstrings. Rationale. The aim of this PEP is to standardize the high- ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Planned units represents the state of the controller’s model as of the the current hook invocation.
It should reflect both scale up and scale down.
It will reflect the results of a CLI command after that command has been run, any resultant hooks have been processed and sent to the controller, and the agent has updated its local copy of the model with that in the controller. Most of the time, this is transparent to the operator who ran the CLI command – you have to do work to catch the charm in the act of updating its controller state after you run an action.
I’ll work up a PR to refactor the docs so that they reflect this.
Code merged. Closing issue 😃