Add ListServiceStatuses grpc method#2856
Merged
dperny merged 1 commit intomoby:masterfrom May 16, 2019
Merged
Conversation
4c61164 to
560a8a6
Compare
Codecov Report
@@ Coverage Diff @@
## master #2856 +/- ##
==========================================
+ Coverage 62.15% 62.34% +0.19%
==========================================
Files 139 139
Lines 22316 22341 +25
==========================================
+ Hits 13870 13929 +59
+ Misses 6960 6929 -31
+ Partials 1486 1483 -3 |
jlhawn
approved these changes
May 15, 2019
Contributor
jlhawn
left a comment
There was a problem hiding this comment.
IANAM but LGTM
... and it's very well commented! 👍
560a8a6 to
cc935e4
Compare
Adds a ListServiceStatuses method. This does server-side computation of service desired vs running tasks. This is a very common operation on the client, but performing it previously required getting a list of all tasks for a service, which was both network and computationally expensive. Signed-off-by: Drew Erny <drew.erny@docker.com>
cc935e4 to
251cbb7
Compare
Collaborator
Author
|
The TestUpdaterRollback tests are known flaky, and I am going to merge if I get a test run that is green, unless I see an error unrelated to TestUpdaterRollback. |
dperny
added a commit
to dperny/docker
that referenced
this pull request
May 24, 2019
Includes the following changes since last vendoring: moby/swarmkit#2795 - Add capabilities list to container specification moby/swarmkit#2845 - Fix linting error moby/swarmkit#2848 - Bump fernet/fernet-go moby/swarmkit#2856 - Add ListServiceStatuses grpc method moby/swarmkit#2857 - Use Service Placement Constraints in Enforcer Signed-off-by: Drew Erny <drew.erny@docker.com>
docker-jenkins
pushed a commit
to docker-archive/docker-ce
that referenced
this pull request
May 26, 2019
Includes the following changes since last vendoring: moby/swarmkit#2795 - Add capabilities list to container specification moby/swarmkit#2845 - Fix linting error moby/swarmkit#2848 - Bump fernet/fernet-go moby/swarmkit#2856 - Add ListServiceStatuses grpc method moby/swarmkit#2857 - Use Service Placement Constraints in Enforcer Signed-off-by: Drew Erny <drew.erny@docker.com> Upstream-commit: 67e25ec5ac568a893e444891a6a583fd2f996f76 Component: engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Added a gRPC method
ListServiceStatusesto the control API. This performs the extremely common UI operation of calculating service actual vs desired tasks on the server side, which reduces the amount of work and number of network requests required by clients.- How I did it
Counting up tasks, EZPZ. Global services are checked with the standard trick of looking at all tasks in desired state running.
Using a new gRPC method avoids having to change the
Serviceproto to accommodate what is essentially fleeting UI data.- How to test it
Includes a robust unit test
- Description for the changelog
swarmkit now supports querying service task actual and desired counts directly, allowing for optimizations in the engine as well.