Skip to content

Conversation

@tiborvass
Copy link
Contributor

@tiborvass tiborvass commented Aug 6, 2019

Reduce time of integration tests by dividing tests into 3 parallel runs

I have to open a new PR because force push on #39680 did not work.

Related to #39651

@tiborvass tiborvass force-pushed the jenkinsfile_reduce_time branch 8 times, most recently from 208776c to 5a147c7 Compare August 7, 2019 13:42
@tiborvass tiborvass force-pushed the jenkinsfile_reduce_time branch 3 times, most recently from c8fe607 to 55d938f Compare August 7, 2019 18:00
@tiborvass tiborvass marked this pull request as ready for review August 7, 2019 18:00
@tiborvass tiborvass requested a review from tianon as a code owner August 7, 2019 18:00
@tiborvass tiborvass force-pushed the jenkinsfile_reduce_time branch from 55d938f to 5e4ae80 Compare August 7, 2019 18:11
@tiborvass tiborvass force-pushed the jenkinsfile_reduce_time branch from 5e4ae80 to 8fafa8b Compare August 7, 2019 18:28
Copy link
Contributor

@andrewhsu andrewhsu left a comment

Choose a reason for hiding this comment

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

LGTM w.r.t. reducing janky PR check times from 2 hrs down to 1 hr

@tiborvass tiborvass force-pushed the jenkinsfile_reduce_time branch 5 times, most recently from 5488d3e to 346bb1f Compare August 7, 2019 23:50
@andrewhsu andrewhsu force-pushed the jenkinsfile_reduce_time branch from 4019239 to da72bbc Compare August 9, 2019 05:44
@andrewhsu
Copy link
Contributor

With the last 4 commits I added, the total time for the PR check with Jenkinsfile takes 59m 30s:
https://ci.docker.com/public/blue/organizations/jenkins/moby/detail/PR-39682/25/pipeline/

This was accomplished by moving the integration-cli tests to only run on merge to master for experimental, z, and powerpc builds. The integration-cli tests are still run on PR checks in the janky job. The integration-cli tests will likely add 1 hr of time to the jobs that run against master branch, so it will be around 2 hrs total: https://ci.docker.com/public/blue/organizations/jenkins/moby/activity?branch=master

Tibor Vass and others added 12 commits August 12, 2019 20:41
The powerpc-master stage will just run the integration-cli tests. The
existing powerpc stage will run the unit tests and the integration
tests. In this way, PR check jobs will be shorter, but all integration
tests will run after PR is merged to master.

Signed-off-by: Andrew Hsu <[email protected]>
The z-master stage will just run the integration-cli tests. The
existing z stage will run the unit tests and the integration
tests. In this way, PR check jobs will be shorter, but all
integration tests will run after PR is merged to master.

Signed-off-by: Andrew Hsu <[email protected]>
In case a job fails before even generating a report file.

Signed-off-by: Andrew Hsu <[email protected]>
@andrewhsu andrewhsu force-pushed the jenkinsfile_reduce_time branch from 46cffd5 to eb30f0a Compare August 12, 2019 20:49
@andrewhsu
Copy link
Contributor

I've rebased to resolve conflicts.

With these final changes in, would like to merge when green so we can reap the benefits of faster PR check results.

@andrewhsu
Copy link
Contributor

From the PR check on eb30f0a there is just a known flaky test failure:

FAIL: docker_cli_swarm_test.go:1333: DockerSwarmSuite.TestSwarmClusterRotateUnlockKey

The legacy PR check on janky has the same test passing.

PASS: docker_cli_swarm_test.go:1333: DockerSwarmSuite.TestSwarmClusterRotateUnlockKey	70.303s

@andrewhsu
Copy link
Contributor

@thaJeztah @vdemeester @cpuguy83 this PR is ready for your consideration

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.

LGTM

'''
}
}
// needs to be last stage that calls make.sh for the junit report to work
Copy link
Member

Choose a reason for hiding this comment

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

What was the problem if it wasn't the last stage? Does it help if you upload the junit.xml as part of the stage itself? (See #39719)

Copy link
Contributor

Choose a reason for hiding this comment

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

The unit test stage needs to be last because the tests will be written to bundles directory and if the other stages run after the unit test stage then the directory would be wiped out.

Want to honor the return value of the unit tests, so if the tests has a failure then it will return non-zero back to the shell and jenkins will stop processing that step and mark that step as red. The always stage is an exception catch stage that will be run whether any of the steps fail, so that would be a suitable place to consume the junit.xml file.

Copy link
Member

Choose a reason for hiding this comment

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

Does KEEPBUNDLE=1 work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe. Can do in followup

Copy link
Member

Choose a reason for hiding this comment

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

Each stage can upload its bundles/results before the next stage starts

@tiborvass
Copy link
Contributor Author

LGTM

Copy link
Member

@cpuguy83 cpuguy83 left a comment

Choose a reason for hiding this comment

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

LGTM

It would be nice if we can consolidate the actual logic and only setup the envs for each arch.

@cpuguy83 cpuguy83 merged commit 9b25c0f into moby:master Aug 13, 2019
@thaJeztah
Copy link
Member

@cpuguy83 yes; was also giving things a quick go in #39708

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.

6 participants