Always set (empty) UpdateStatus
When deploying a service the UpdateStatus.State field is not present
during docker service create. This complicates creating scripts that
check for UpdateStatus.State to reach a certain state, as they have to take
into account that the UpdateStatus as a whole is missing.
This patch always sets the UpdateStatus.State to make it easier to consume.
addresses https://github.com/moby/moby/issues/28012
@dperny @aaronlehmann PTAL; I haven't fully triaged if this could have side-effects, but noticed I still had this change in my local repo after looking at https://github.com/moby/moby/issues/28012#issuecomment-458914339, so thought I'd push it as a PR 🤗 😇
Codecov Report
Merging #2820 into master will decrease coverage by
0.03%. The diff coverage is100%.
@@ Coverage Diff @@
## master #2820 +/- ##
==========================================
- Coverage 62.01% 61.98% -0.04%
==========================================
Files 139 137 -2
Lines 22123 22145 +22
==========================================
+ Hits 13720 13727 +7
- Misses 6930 6939 +9
- Partials 1473 1479 +6