-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ListServiceStatuses grpc method #2856
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
cc935e4
to
251cbb7
Compare
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. |
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 <[email protected]>
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 <[email protected]> Upstream-commit: 67e25ec5ac568a893e444891a6a583fd2f996f76 Component: engine
- What I did
Added a gRPC method
ListServiceStatuses
to 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
Service
proto 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.