Better diangostics for parallel test execution in CI#38200
Merged
Conversation
When running tests in parallel in our CI we switched off showing success outputs by default in apache#38157. This is generally a good thing, because it only shows outputs for the test types that failed and makes the CI log output far snappier in case only one or few test types failed. However it also has a side effect that it's not really easy to see what kind of commands were run in each parallel test type, so we might get accidentally some mistakes where we miss that our tests are not doing what we think they are doing - for example not running tests for various Python versions, only for one, or not running them for various database versions (both cases happened in the past). By hiding the success outputs, we make it harder to spot such issues. This PR introduces two ways to improve it: * we can now set a label on PR to `include success outputs` and any committer can set the label to show success outputs as well. * When we run parallel unit tests we summarize what is going to be executed - showing all the ShellParams passed to the parallel test execution. This is the best place to show it because this ShellParams object contains all the actual values passed - after processing throught options, special environment variables and so-on - so those are the actual values used to run the parallel tests. Also it will be printed in a prominent place - just before test execution in the main console output, which means it will be visible without the need to unfold any output.
Member
Author
eladkal
approved these changes
Mar 16, 2024
potiuk
added a commit
to potiuk/airflow
that referenced
this pull request
Mar 16, 2024
The apache#38200 had already good results - I realized IMAGE_TAG has not been propagated to the tests - and we were effectively testing latest images rather than current PR images 😱
potiuk
added a commit
that referenced
this pull request
Mar 16, 2024
The #38200 had already good results - I realized IMAGE_TAG has not been propagated to the tests - and we were effectively testing latest images rather than current PR images 😱
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.


When running tests in parallel in our CI we switched off showing success outputs by default in #38157. This is generally a good thing, because it only shows outputs for the test types that failed and makes the CI log output far snappier in case only one or few test types failed.
However it also has a side effect that it's
not really easy to see what kind of commands were run in each parallel test type, so we might get accidentally some mistakes where we miss that our tests are not doing what we think they are doing - for example not running tests for various Python versions, only for one, or not running them for various database versions (both cases happened in the past). By hiding the success outputs, we make it harder to spot such issues.
This PR introduces two ways to improve it:
we can now set a label on PR to
include success outputsand any committer can set the label to show success outputs as well.When we run parallel unit tests we summarize what is going to be executed - showing all the ShellParams passed to the parallel test execution. This is the best place to show it because this ShellParams object contains all the actual values passed - after processing throught options, special environment variables and so-on - so those are the actual values used to run the parallel tests.
Also it will be printed in a prominent place - just before test execution in the main console output, which means it will be visible without the need to unfold any output.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.