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 CI by using pre-built tests image #977

Merged
merged 7 commits into from
Feb 23, 2021

Conversation

jpopelka
Copy link
Member

@jpopelka jpopelka commented Feb 16, 2021

We now have tests image in Quay.io which is re-built on a push to this repo.
When we run tests, we don't rebuild the image (as we used to), but use the quay.io/packit/packit-service-tests and mount sources into its /src.

Pros:

  • packit-service-tests run about 2min instead of 8min
  • packit-service-tests-requre are a bit faster, around 17min instead of 18min - the most time takes spawning an Openshift cluster and building worker:dev & service:dev. It's actually 2 tests (1. tests with pre-recorded responses, 2. deployment test), but we run them together because spawning an Openshift cluster is such an expensive operation. If we split it, we could use pre-built worker:dev & service:dev for the requre test, which would speed up it a lot. But we need to build them for the deployment test anyway, which would again take (with spawning a cluster for it) about 18min so all tests together would take the same time as now.

Cons:

  • If a PR adds a new dependency to worker or service that dependency won't be in the test image during the tests run and the tests will probably fail. Work-around is to make test_image and podman push.

@jpopelka jpopelka changed the title WIP: Speed up tests WIP: Speed up CI Feb 16, 2021
@jpopelka jpopelka force-pushed the speed-up-tests branch 3 times, most recently from ec22972 to 0b2216e Compare February 16, 2021 11:10
@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul

This comment has been minimized.

Makefile Show resolved Hide resolved
@softwarefactory-project-zuul

This comment has been minimized.

@jpopelka jpopelka force-pushed the speed-up-tests branch 2 times, most recently from c240fba to 28f0d8c Compare February 16, 2021 17:37
@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul

This comment has been minimized.

@jpopelka jpopelka changed the title WIP: Speed up CI Speed up CI by using pre-built tests image Feb 19, 2021
@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul

This comment has been minimized.

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

Copy link
Member

@TomasTomecek TomasTomecek left a comment

Choose a reason for hiding this comment

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

:O

@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

they have been commented out since where the history reaches
It doesn't seem to be used anywhere,
we later copy responses into local_data_dir (tests_requre/openshift_integration)
it might not be needed since there's only one job,
but it's confusing without it
Building worker:dev and then tests image from it is no advantage over building tests image from base.
And it might lead to confusion when running tests locally and the worker:dev is outdated.
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded.

@jpopelka jpopelka added the mergeit When set, zuul wil gate and merge the PR. label Feb 23, 2021
@softwarefactory-project-zuul
Copy link
Contributor

Build succeeded (gate pipeline).

@softwarefactory-project-zuul softwarefactory-project-zuul bot merged commit b03cca9 into packit:main Feb 23, 2021
@jpopelka jpopelka deleted the speed-up-tests branch February 23, 2021 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mergeit When set, zuul wil gate and merge the PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants