Skip to content
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

Speed up windows CI/CD #1982

Merged
merged 7 commits into from
Sep 3, 2020
Merged

Speed up windows CI/CD #1982

merged 7 commits into from
Sep 3, 2020

Conversation

wcs1only
Copy link
Contributor

@wcs1only wcs1only commented Aug 31, 2020

Description

This PR contains several improvements to E2E tests for both linux and windows tests.

  1. Rather than do a multistaged windows build from servercore and nanoserver, we'll use a prebuilt nanoserver image that already has the dependancies we need. This saves us 5-10 minutes.
  2. Don't wait for container termination to start the next test. Container termination, in some cases, takes longer than the actual test. This saves us ~10 minutes.
  3. Build the e2e test apps on the host machine instead of in an intermediate golang container. One of the big drags of the e2e docker container build was pulling all the go dependancies each time for each app. Building on the host machine allows dependancies to be pulled only once. This saves us nearly 10 minutes on the windows build.
  4. Run 2 test apps at a time. Since each test app is independent from all the others, we can run more that one without issue. This saves us ~10-20 minutes.

These improvements gets the tests down to ~20 minutes for linux and ~30 minutes for windows. Since this is even better than our current test runtime (~30-40 minutes) we should be able to run both in parallel each time we do /ok-to-test

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1944

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

@wcs1only
Copy link
Contributor Author

/ok-to-test

@wcs1only
Copy link
Contributor Author

/ok-to-wintest

@dapr-bot
Copy link
Collaborator

Found the available test cluster - dapr-aks-e2e-05. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

Found the available test cluster - dapr-aks-e2e-06. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

End-to-end tests failed.

@wcs1only
Copy link
Contributor Author

wcs1only commented Sep 1, 2020

/ok-to-wintest

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

Found the available test cluster - dapr-aks-e2e-06. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

End-to-end tests failed.

1 similar comment
@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

End-to-end tests failed.

@wcs1only
Copy link
Contributor Author

wcs1only commented Sep 1, 2020

/ok-to-test

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

Found the available test cluster - dapr-aks-e2e-06. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

Congrats! All end-to-end tests have passed. Thanks for your contribution!

@wcs1only
Copy link
Contributor Author

wcs1only commented Sep 1, 2020

/ok-to-wintest

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

Found the available test cluster - dapr-aks-e2e-05. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

End-to-end tests failed.

@wcs1only
Copy link
Contributor Author

wcs1only commented Sep 1, 2020

/ok-to-wintest

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

Found the available test cluster - dapr-aks-e2e-05. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

End-to-end tests failed.

@wcs1only
Copy link
Contributor Author

wcs1only commented Sep 1, 2020

/ok-to-wintest

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

Found the available test cluster - dapr-aks-e2e-05. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 1, 2020

Congrats! All end-to-end tests have passed. Thanks for your contribution!

@wcs1only wcs1only marked this pull request as ready for review September 1, 2020 18:24
@wcs1only
Copy link
Contributor Author

wcs1only commented Sep 3, 2020

/ok-to-perf

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

Found the available test cluster - dapr-aks-e2e-05. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

All Dapr perf tests completed.


# start all perf tests
test-perf-all: check-e2e-env
DAPR_TEST_NAMESPACE=$(DAPR_TEST_NAMESPACE) DAPR_TEST_TAG=$(DAPR_TEST_TAG) DAPR_TEST_REGISTRY=$(DAPR_TEST_REGISTRY) DAPR_TEST_MINIKUBE_IP=$(MINIKUBE_NODE_IP) go test -p 1 -count=1 -v -tags=perf ./tests/perf/...
DAPR_TEST_NAMESPACE=$(DAPR_TEST_NAMESPACE) DAPR_TEST_TAG=$(DAPR_TEST_TAG) DAPR_TEST_REGISTRY=$(DAPR_TEST_REGISTRY) DAPR_TEST_MINIKUBE_IP=$(MINIKUBE_NODE_IP) go test -p 2 -count=1 -v -tags=perf ./tests/perf/...
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to keep it as 1 for perf test :) otherwise, two perf test can run in parallel, which results in the wrong perf number.

cc/ @yaron2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. Will fix.

@wcs1only wcs1only merged commit 15a3113 into dapr:master Sep 3, 2020
@wcs1only
Copy link
Contributor Author

wcs1only commented Sep 3, 2020

/ok-to-test

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

Found the available test cluster - dapr-aks-e2e-05 for linux. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

Found the available test cluster - dapr-aks-e2e-06 for windows. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

End-to-end tests failed on linux.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

End-to-end tests cancelled on windows.

@wcs1only
Copy link
Contributor Author

wcs1only commented Sep 3, 2020

/ok-to-test

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

Found the available test cluster - dapr-aks-e2e-05 for linux. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

Found the available test cluster - dapr-aks-e2e-06 for windows. Please wait until test is done.

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

Congrats! All end-to-end tests have passed on linux. Thanks for your contribution!

@dapr-bot
Copy link
Collaborator

dapr-bot commented Sep 3, 2020

End-to-end tests failed on windows.

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.

Improve the speed of windows CI e2e tests.
4 participants