apiserver: add workload version to API #5679

Closed
wants to merge 16 commits into
from

Conversation

Projects
None yet
1 participant
Member

babbageclunk commented Jun 21, 2016

Add WorkloadVersion and SetWorkloadVersion to the uniter API, and workload version information in the Status structure.

Unit workload version is reported and it's also aggregated up to the application level. If the units are reporting different versions the most common version is used, with a * to indicate that there is some deviation (which can then be investigated at the unit level).

This builds on PR #5650 which is blocked, so it appears to include all of those changes as well - I'll update the review in RB to show only the changes for this branch.

babbageclunk added some commits Jun 14, 2016

Add Unit.WorkloadVersion to state
First step of propagating workload version from units to juju status.
Move description/service.go to application.go
And tests as well. (Drive-by)
Add Unit.WorkloadVersion to export/import
Also drive-by changed some test names from Service to Application.
Store workload version in status
Rather than storing it as an attribute of the unit doc. We want to avoid
adding new fields to existing documents - each one means that there are
more possible things that could change that would notify all of the
watchers hanging off the document, increasing the likelihood of
unnecessary message storms.
Update description for workload version history
We may as well carry this across as well, since it's in the model.
Combine unit workload versions to application
Pick the mode, excluding "" (because it's unset). In the case of a tie
pick the first lexicographically. If there are multiple unit versions,
add a * on the end of the application version.
Merge combineUnitVersions into processApplication
Shorter, less data shuffling and just as clear.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment