-
Notifications
You must be signed in to change notification settings - Fork 615
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
Version service specs #2033
Version service specs #2033
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2033 +/- ##
==========================================
+ Coverage 53.39% 53.45% +0.05%
==========================================
Files 111 111
Lines 19678 19689 +11
==========================================
+ Hits 10508 10525 +17
- Misses 7894 7901 +7
+ Partials 1276 1263 -13 Continue to review full report at Codecov.
|
@aluzzardi: We were discussing earlier about why For this reason, I think it's better to use an independent versioning scheme for |
manager/controlapi/service.go
Outdated
service.Spec = *service.PreviousSpec.Copy() | ||
service.SpecVersion = service.PreviousSpecVersion |
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.
Can we put spec_version
for a service inside of ServiceSpec
? Then you don't need tracking like this.
Can we put spec_version for a service inside of ServiceSpec? Then you don't need tracking like this.
If we did that, it would be under the user's control, which I don't think makes sense.
|
LGTM |
ac42b98
to
4cb5328
Compare
Rebased |
Adds fields to Service and Task that keep track of a version number for ServiceSpecs. This version number is different from the service object version (which is tied to the Raft index). Then change the scheduler to use this, instead of marshalling the specs to compare them (which didn't work reliably). Also make the orchestrator use SpecVersion as an optimization, when available. Signed-off-by: Aaron Lehmann <[email protected]>
4cb5328
to
f59c95f
Compare
Updated to use the ping @aluzzardi @dongluochen |
LGTM Maybe we should use versions for the control API filter |
Adds fields to
Service
andTask
that keep track of a version number forServiceSpec
s. This version number is different from the service object version (which is tied to the Raft index).Then change the scheduler to use this, instead of marshalling the specs to compare them (which didn't work reliably).
Also make the orchestrator use
SpecVersion
as an optimization, when available.Note this versioning is not used by the API at this point. It's a purely internal thing.
Supersedes #1392
cc @aluzzardi @dongluochen