Inconsistent naming of status output between different APIs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
High
|
Unassigned |
Bug Description
I filed a bug for libjuju [0] about differences in the output structure of Model.get_status compared with `juju status --format=yaml`
I was advised to open a bug here as well, since the issue apparently is related to inconsistencies between different APIs [1]
This is the summary of the differences as I posted in the related libjuju bug:
+------
| instance | jsfy | libjuju |
+------
| machine/container | machine-status | instance-status |
| unit/subordinate | workload-status | workload-status |
| application | application-status | status |
| juju status msg | workload-
| juju agent details | (unit).juju-status | (unit).agent-status |
+------
example outputs
jsfy - https:/
libjuju - https:/
[0] https:/
[1] https:/
description: | updated |
Changed in juju: | |
milestone: | 3.0.0 → 3.0.1 |
Changed in juju: | |
milestone: | 3.0.1 → 3.0.2 |
Changed in juju: | |
milestone: | 3.0.2 → 3.0.3 |
Changed in juju: | |
milestone: | 3.0.3 → 3.0.4 |
We'll need to figure out the best approach here since there's a compatibility issue changing field names. At first glance, Juju seems at "fault" here as it takes the raw feed from the API and renames the fields. At least that's the case for the one I looked at "instance-status" becomes "machine-status". Juju would have renamed the output to conform with modelling decisions and it did so on the client side to preserve api compatibility. I think my preference would be to change libjuju to match juju. libjuju could get the renamed fields added as new fields and then remove the old ones in juju 3.0. On that basis this but would be a "Won't Fix" for juju but will leave open till we agree on the approach.