swarmkit icon indicating copy to clipboard operation
swarmkit copied to clipboard

Always set (empty) UpdateStatus

Open thaJeztah opened this issue 7 years ago • 2 comments

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

thaJeztah avatar Feb 09 '19 10:02 thaJeztah

@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 🤗 😇

thaJeztah avatar Feb 09 '19 10:02 thaJeztah

Codecov Report

Merging #2820 into master will decrease coverage by 0.03%. The diff coverage is 100%.

@@            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

codecov[bot] avatar Feb 09 '19 11:02 codecov[bot]