Use process substitution to redirect to tee#46431
Merged
thaJeztah merged 1 commit intomoby:masterfrom Sep 8, 2023
Merged
Conversation
sam-thibault
reviewed
Sep 8, 2023
hack/make/test-docker-py
Outdated
| ) | ||
| bundle .integration-daemon-stop | ||
| ) 2>&1 | tee -a "$DEST/test.log" | ||
| ) 2>&1 >(tee -a "$DEST/test.log") |
Contributor
There was a problem hiding this comment.
no &>? Are the changes in these two file different because we don't want to redirect stderr here?
Member
Author
There was a problem hiding this comment.
It was a mistake, fixed it, thanks
9335a86 to
6ccd270
Compare
In some cases, when the daemon launched by a test panics and quits, the cleanup code would end with an error when trying to kill it by its pid. In those cases the whole suite will end up waiting for the daemon that we start in .integration-daemon-start to finish and we end up waiting 2 hours for the CI to cancel after a timeout. Using process substitution makes the integration tests quit. Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
6ccd270 to
3d8b8dc
Compare
vvoland
approved these changes
Sep 8, 2023
Member
Author
akerouanton
approved these changes
Sep 8, 2023
Member
akerouanton
left a comment
There was a problem hiding this comment.
Oh I think I ran into this a few times while running integration tests through delve. I guess I'll now be able to submit my change. Thanks for tackling this!
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 I did
In some cases, when the daemon launched by a test panics and quits, the cleanup code would end with an error when trying to kill it by its pid. In those cases the whole suite will end up waiting for the daemon that we start in .integration-daemon-start to finish and we end up waiting 2 hours for the CI to cancel after a timeout.
Using process substitution makes the integration tests quit.
- How I did it
- How to verify it
Run
$ make DOCKER_GRAPHDRIVER=overlayfs TEST_FILTER=TestRunWithRuntimeFromConfigFile TEST_INTEGRATION_USE_SNAPSHOTTER=1 test-integrationBefore this change this will never stop and hang after the
/go/src/github.com/docker/docker/hack/make/.integration-daemon-stop: line 11: kill: (1269) - No such processerror.After this change the script will stop after the kill error in the cleanup code.
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)