Skip to content

migrate service update integration tests from integration-cli to integration/service package#37564

Merged
AkihiroSuda merged 1 commit intomoby:masterfrom
adshmh:migrate-docker_cli_service_update_test-to-integration-service-fixed-flake
Dec 31, 2018
Merged

migrate service update integration tests from integration-cli to integration/service package#37564
AkihiroSuda merged 1 commit intomoby:masterfrom
adshmh:migrate-docker_cli_service_update_test-to-integration-service-fixed-flake

Conversation

@adshmh
Copy link
Contributor

@adshmh adshmh commented Jul 30, 2018

This is a follow up PR on #37492 (closed and reverted due to 2 flaky tests). This PR attempts to fix that by polling the update state of the service.

- What I did
Refactored and moved service update integration tests from the integration-cli package to integration/service

- How I did it
Removed the integration test file integration-cli//docker_cli_service_update_test.go and added new test file integration/service/update_test.go with corresponding tests.

- How to verify it

- Description for the changelog
Service update integration tests have been moved from integration-cli to integration/service package.

- A picture of a cute animal (not mandatory but encouraged)

Copy link
Contributor

@boaz0 boaz0 left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@boaz0
Copy link
Contributor

boaz0 commented Jul 31, 2018

CI failed on TestServiceUpdateConfigs and TestServiceUpdateSecrets which are related to this change. 😞

@adshmh
Copy link
Contributor Author

adshmh commented Jul 31, 2018

Thank you for the reviews, I will look into failures.

Copy link
Member

@vdemeester vdemeester left a comment

Choose a reason for hiding this comment

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

LGTM 🐯

@vdemeester
Copy link
Member

@adshmh needs a rebase though 👼

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

LGTM but needs rebase

Copy link
Member

@yongtang yongtang left a comment

Choose a reason for hiding this comment

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

LGTM. @adshmh Can you do a rebase?

@adshmh
Copy link
Contributor Author

adshmh commented Oct 15, 2018

@yongtang thank you for the review. I think 2 of the tests are flaky and it is not clear why yet, so I am looking into the cause. So far the test failures have not happened on my local builds over several re-runs.

@olljanat
Copy link
Contributor

@adshmh this one needs to be rebased

@derek derek bot added the status/failing-ci Indicates that the PR in its current state fails the test suite label Dec 22, 2018
@thaJeztah
Copy link
Member

Conflict is due to 83363fb#diff-dc96b4992b77c3e1cd181b2fd9162b5eR17 (#37635) which made changes to integration-cli/docker_cli_service_update_test.go (which is being removed in this PR)

…rvice_update_test.go to integration/service

Signed-off-by: Arash Deshmeh <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah force-pushed the migrate-docker_cli_service_update_test-to-integration-service-fixed-flake branch from 2d0e475 to be151a7 Compare December 24, 2018 19:32
@codecov
Copy link

codecov bot commented Dec 24, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@8fbf259). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master   #37564   +/-   ##
=========================================
  Coverage          ?   35.62%           
=========================================
  Files             ?      610           
  Lines             ?    44896           
  Branches          ?        0           
=========================================
  Hits              ?    15992           
  Misses            ?    26697           
  Partials          ?     2207

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

rebased; changes LGTM

let's merge on green 👍

@thaJeztah thaJeztah added status/4-merge and removed status/2-code-review status/failing-ci Indicates that the PR in its current state fails the test suite labels Dec 24, 2018
@olljanat
Copy link
Contributor

olljanat commented Dec 26, 2018

z looks to be failed to:

07:40:41 --- FAIL: TestServiceUpdateConfigs (2.90s)
07:40:41     daemon.go:296: [d954a5785d31c] waiting for daemon to start
07:40:41     daemon.go:328: [d954a5785d31c] daemon started
07:40:41     update_test.go:188: assertion failed: error is not nil: Error response from daemon: rpc error: code = Unknown desc = update out of sequence
07:40:41     daemon.go:283: [d954a5785d31c] exiting daemon
07:40:41 FAIL
07:40:41 ---> Making bundle: .integration-daemon-stop (in bundles/test-integration)
07:40:44 Clearing AppArmor profiles cache:.

which I have not seen earlier but let's see if rebuild helps

@thaJeztah
Copy link
Member

Same failure again; odd 🤔

@adshmh
Copy link
Contributor Author

adshmh commented Dec 28, 2018

Sorry for the delay in response. The service update tests still seem flaky, even though I have added a polling function to check on the status of the service. This time, TestServiceUpdateConfigs passed, but TestServiceUpdateSecrets failed, both of which use the same polling function to verify service status, before issuing subsequent update calls.

Currently looking at the service update command on docker CLI repo, as well as swarmkit repo, to find out if there are any other conditions to check after a service update API call before issuing the next one.

@olljanat
Copy link
Contributor

These have not been flaky earlier. Maybe some temporary issue on server. Let's try once more...

@AkihiroSuda
Copy link
Member

ready to merge?

@olljanat
Copy link
Contributor

@AkihiroSuda afaik, yes.
@thaJeztah said week ago

let's merge on green +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants