Skip to content

test/system: Decouple image caching from Zuul - #774

Merged
martymichal merged 1 commit into
containers:mainfrom
martymichal:test/system/decouple-caching-from-zuul
May 31, 2021
Merged

martymichal merged 1 commit into
containers:mainfrom
martymichal:test/system/decouple-caching-from-zuul

Conversation

@martymichal

@martymichal martymichal commented May 25, 2021 •

Copy link
Copy Markdown
Member

See commit for description.

Fixes #751

@martymichal martymichal added 3. Enhancement Improvement to an existing feature 6. Major Change May cause breakage 2. CI Automation of testing, analysis and other actions 2. Testing Related to testing of Toolbox - unit, system,.. labels May 25, 2021
@martymichal
martymichal marked this pull request as draft May 25, 2021 22:14
@martymichal
martymichal force-pushed the test/system/decouple-caching-from-zuul branch 4 times, most recently from a4a323a to 0f68fcf Compare May 26, 2021 12:11
@martymichal martymichal changed the title test/system: Decouple image caching from Zuul, bump used fedora image… test/system: Decouple image caching from Zuul May 26, 2021
@martymichal
martymichal marked this pull request as ready for review May 26, 2021 12:12
@martymichal

Copy link
Copy Markdown
Member Author

recheck

@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@martymichal
martymichal force-pushed the test/system/decouple-caching-from-zuul branch from 0f68fcf to cdca5f3 Compare May 26, 2021 21:05
@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

@martymichal
martymichal force-pushed the test/system/decouple-caching-from-zuul branch from cdca5f3 to 1a9909a Compare May 26, 2021 21:19
@softwarefactory-delete-me

Copy link
Copy Markdown

Build failed.

martymichal added a commit to martymichal/toolbox that referenced this pull request May 31, 2021
Since the rewrite of the system test suite[0] we've relied on the Zuul
playbooks for taking care of caching images using Skopeo for increasing
the reliability of the tests (in the past the instability of the Fedora
registry caused problems). This state is problematic if we want to use
the tests in other environments than the Zuul CI. This moves the caching
from Zuul into the system tests.

Currently, Bats does not support officially suite-wide setup and
teardown functions. The solution I chose was to add two new test files
that are executed before and after all tests. This may complicate the
execution of cherry-picked tests but that is not a very common use case
anyway.

The tests are now to some extent capable of adjusting to the host
environment. This is meant in the sense of: I'm running on RHEL, the
"default image" is UBI; I'm running on Fedora, the "default image" is
fedora-toolbox. This mechanism relies on os-release, which is the same
as what Toolbox itself uses.

Along the road I chose to update the f29/fedora-toolbox:29 image to the
fedora-toolbox:32 image because I did not want to maintain two versions
of images (the name changed some time ago[1]). I also introduced or
modified a number of helper functions to make better use of the caching
and default system recognition.

[0] containers#517
[1] containers#615

containers#774
@martymichal
martymichal force-pushed the test/system/decouple-caching-from-zuul branch from 1a9909a to 16b3560 Compare May 31, 2021 10:41
@softwarefactory-delete-me

Copy link
Copy Markdown

Build succeeded.

@martymichal

Copy link
Copy Markdown
Member Author

recheck

@softwarefactory-delete-me

Copy link
Copy Markdown

Build succeeded.

Since the rewrite of the system test suite[0] we've relied on the Zuul
playbooks for taking care of caching images using Skopeo for increasing
the reliability of the tests (in the past the instability of the Fedora
registry caused problems). This state is problematic if we want to use
the tests in other environments than the Zuul CI. This moves the caching
from Zuul into the system tests.

Currently, Bats does not support officially suite-wide setup and
teardown functions. The solution I chose was to add two new test files
that are executed before and after all tests. This may complicate the
execution of cherry-picked tests but that is not a very common use case
anyway.

The tests are now to some extent capable of adjusting to the host
environment. This is meant in the sense of: I'm running on RHEL, the
"default image" is UBI; I'm running on Fedora, the "default image" is
fedora-toolbox. This mechanism relies on os-release, which is the same
as what Toolbox itself uses.

[0] containers#517

containers#774
@martymichal
martymichal force-pushed the test/system/decouple-caching-from-zuul branch from 16b3560 to da6b6a7 Compare May 31, 2021 11:58
@softwarefactory-delete-me

Copy link
Copy Markdown

Build succeeded.

@martymichal
martymichal merged commit 54a2ca1 into containers:main May 31, 2021
@martymichal
martymichal deleted the test/system/decouple-caching-from-zuul branch May 31, 2021 22:41

@debarshiray debarshiray left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice! I wonder if it would help to have a Toolbox flag that outputs the details of the image and container that would be used by a specific toolbox incantation? Something like git commit --dry-run.

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

Labels

2. CI Automation of testing, analysis and other actions 2. Testing Related to testing of Toolbox - unit, system,.. 3. Enhancement Improvement to an existing feature 6. Major Change May cause breakage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move image caching from Zuul playbook

2 participants