Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
status: Fix Relation section of tabular output #7729
Conversation
| @@ -243,3 +244,10 @@ func (s unitStatus) MarshalYAML() (interface{}, error) { | ||
| } | ||
| return unitStatusNoMarshal(s), nil | ||
| } | ||
| + | ||
| +type relationStatus struct { | ||
| + Provider string `json:"provider" yaml:"provider"` |
wallyworld
Aug 10, 2017
Owner
If Relations in formattedStatus is "-", then we don't need tags in this struct
| } | ||
| + return a.Provider < b.Provider | ||
| + }) | ||
| + outputHeaders("Relation Provider", "Requirer", "Interface", "Type") |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 4e9636a
into
juju:2.2
Aug 10, 2017
1 check passed
continuous-integration/jenkins/pr-merge
This commit looks good
Details
babbageclunk
deleted the
babbageclunk:status-weirdness
branch
Aug 10, 2017
|
Related bug discovered after the fact: https://bugs.launchpad.net/juju/+bug/1597490 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
babbageclunk commentedAug 10, 2017
Description of change
The Relation section had a few problems:
once with type:regular) when the principal's name sorted after the
subordinate's.
in a relation were actually displayed in alphabetical order.
name, but not keeping applications together) isn't useful.
Change the section to report relations once using app:endpoint for each
end. Sort the rows by provider, then by requirer, so you can see all of
the relations that an application is providing more easily.
QA steps
Create a model with several relations, including subordinates. Running
juju statusshould show each relation once, with correct providers and requirers, and the correct relation type (regular/peer/subordinate).Running
juju status --format yamlorjsonshouldn't change.