conformance tests: more parallelization#6851
Open
nalind wants to merge 2 commits into
Open
Conversation
24cc927 to
1879631
Compare
Contributor
Author
|
Looks like that conformance-using-vfs job really is I/O bound. |
b5404bb to
2963718
Compare
Contributor
|
LGTM |
Contributor
|
@nalind looks like you have some conflicts that need to be resolved on this one. |
Honny1
reviewed
Jun 15, 2026
Honny1
left a comment
Contributor
There was a problem hiding this comment.
LGTM, I have just a possible cleanup comment.
Comment on lines
239
to
259
| var eg errgroup.Group | ||
| eg.Go(func() error { | ||
| if test.contextDir != "" { | ||
| getErr = copier.Get("", testDataDir, copier.GetOptions{}, []string{test.contextDir}, pipeWriter) | ||
| } else if test.dockerfile != "" { | ||
| getErr = copier.Get("", testDataDir, copier.GetOptions{}, []string{test.dockerfile}, pipeWriter) | ||
| } | ||
| pipeWriter.Close() | ||
| wg.Done() | ||
| }() | ||
| wg.Add(1) | ||
| go func() { | ||
| return errors.Join(getErr, pipeWriter.Close()) | ||
| }) | ||
| eg.Go(func() error { | ||
| if test.contextDir != "" || test.dockerfile != "" { | ||
| putErr = copier.Put("", contextDir, copier.PutOptions{}, pipeReader) | ||
| } else { | ||
| putErr = os.Mkdir(contextDir, 0o755) | ||
| } | ||
| pipeReader.Close() | ||
| wg.Done() | ||
| }() | ||
| wg.Wait() | ||
| return errors.Join(putErr, pipeReader.Close()) | ||
| }) | ||
| err = eg.Wait() | ||
| assert.NoErrorf(t, err, "error copying build info from %q", filepath.Join("testdata", test.dockerfile)) | ||
| assert.NoErrorf(t, getErr, "error reading build info from %q", filepath.Join("testdata", test.dockerfile)) | ||
| assert.NoErrorf(t, putErr, "error writing build info to %q", contextDir) |
Contributor
There was a problem hiding this comment.
Would it be better to assert errors immediately in the go routine?
Contributor
Author
There was a problem hiding this comment.
Sure. They're safe to be called outside of the goroutine that's running the test (their require counterparts, not so much).
Parallelize more subtests. Use t.Cleanup() instead of "defer" for a few cleanups. CI: don't run "make all" before making the test target; we fixed the target dependencies in the Makefile so that targets ensure that what they need has been built before use. CI: build the buildah binary for the buildah_version and buildah_info tasks. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
In cases where we _prefetch an image, don't create a working container using "--pull" if we only care about the ID of the new container, i.e., we don't care that we actually tried to pull the image from the registry. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind failing-test
What this PR does / why we need it:
Parallelize more subtests to try to finish conformance testing faster.
Use t.Cleanup() instead of defer for a few cleanups.
How to verify it
Conformance tests should complete in less time unless they're I/O bound.
Which issue(s) this PR fixes:
Special notes for your reviewer:
The "conformance tests using VFS" job seems to be limited by I/O, as it's not faster when given more memory and more CPU, and actually appears to be slower when we add the parallelization here. The overlay counterpart, however, finishes in less time than it did before.
Does this PR introduce a user-facing change?