Skip to content

Comments

updater: Fix rollback regression#2105

Merged
dongluochen merged 1 commit intomoby:masterfrom
aaronlehmann:rollback-regression
Apr 8, 2017
Merged

updater: Fix rollback regression#2105
dongluochen merged 1 commit intomoby:masterfrom
aaronlehmann:rollback-regression

Conversation

@aaronlehmann
Copy link
Collaborator

When Monitor is not explicitly set in the spec, we're supposed to use the default. This regressed in #2080.

cc @cyli @dongluochen

When Monitor is not explicitly set in the spec, we're supposed to use
the default.

Signed-off-by: Aaron Lehmann <aaron.lehmann@docker.com>
@aaronlehmann
Copy link
Collaborator Author

This is needed for 17.05.

@codecov
Copy link

codecov bot commented Apr 7, 2017

Codecov Report

Merging #2105 into master will decrease coverage by 2.11%.
The diff coverage is 75%.

@@            Coverage Diff             @@
##           master    #2105      +/-   ##
==========================================
- Coverage   59.23%   57.11%   -2.12%     
==========================================
  Files         117      117              
  Lines       19361    20128     +767     
==========================================
+ Hits        11468    11497      +29     
- Misses       6563     7308     +745     
+ Partials     1330     1323       -7

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59d7fb2...d28eefe. Read the comment docs.

assert.Equal(t, observedTask.Status.State, api.TaskStateNew)
assert.Equal(t, observedTask.Spec.GetContainer().Image, "image1")

if !setMonitor {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than just return, is there some other way we can set a test for this regression? Possibly changing the default value, so that we can set a timeout and hence detect if this regresses again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test checks that the rollback is triggered (see the check for UpdateStatus_ROLLBACK_STARTED above). The rest of the test is about what happens after the rollback starts, and I wouldn't have included this in a test designed to catch this regression, but wanted to reuse the code of this existing test, so I made it return here for this new testcase. Does that sound okay?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM, thanks for explaining!

@cyli
Copy link
Contributor

cyli commented Apr 7, 2017

LGTM, sorry for missing this!

@dongluochen
Copy link
Contributor

LGTM

@dongluochen dongluochen merged commit d523228 into moby:master Apr 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants