Conversation
|
This script appears to be working correctly so far on the 3 example PRs that are linked to this one. The java only change ran most of the test suites, but skipped the web-console, web-console e2e, and docs tests, https://travis-ci.com/github/apache/druid/builds/226501655 The web-console correctly test skipped all jobs except web-console and web-console e2e tests, https://travis-ci.com/github/apache/druid/builds/226501846 cutting total CI compute time down from over 24 hours to under 2.5 hrs. The 3rd PR contains a first commit that is only a doc change, where all tests were skipped except for the docs test https://travis-ci.com/github/apache/druid/builds/226501778, using ~2 hr of compute time, but then a second commit was added to a java file which has triggered all of the java tests to run in addition to the docs tests (to ensure that the diff from all of the PR commits is what we see due to how travis runs PR builds, instead of just the last commit as the git command our script is using might suggest, see https://travis-ci.com/github/apache/druid/jobs/507046243#L662 which has the files from both commits). The branch build ran the entire test suite and skipped nothing, https://travis-ci.com/github/apache/druid/builds/226501106, though looking at the log I guess I could stand to change the script a bit to print that the reason for not skipping the tests is because it is not a PR build to make clearer the reason the tests are being run. I also added a unit test for this test skipping script, "script checks", https://travis-ci.com/github/apache/druid/jobs/506826488, since it was already getting a bit complicated and will only continue to do so as we add more functionality to this script to more selectively run the java tests. |
|
@clintropolis can you push a few more commits to your test PRs to show what happens when there are multiple commits in a PR. Once these tests do what we expect, I'm LGTM. A doc update somewhere to explain which tests are expected to run in what scenarios would be a nice to have, but for now, since only devs are looking at this, I think this PR is pretty self documenting. A couple of scenarios I'd like to better understand what tests will run -
|
|
|
||
| # do some primitive examination of git diff to determine if a test suite needs to be run or not | ||
|
|
||
| always_run_jobs = ['license checks', '(openjdk8) packaging check', '(openjdk11) packaging check'] |
There was a problem hiding this comment.
The comment above doesn't seem to match what this variable is used for. I think the comment above is for the whole file, and this variable has no comment - is this assumption correct? Could we make it clearer in here if that's the case?
I think something as simple as re-wording the previous comment to # This script is meant to do some primitive...
There was a problem hiding this comment.
oops fixed, and added a bunch of other comments too
@suneet-s did you catch this comment in the previous PR #11238 (comment)? tl;dr It mentions that all the commits in a travis PR run are squashed on top of the target branch. You can see this happening in the 2nd run of the 3rd PR, https://travis-ci.com/github/apache/druid/jobs/507046243#L662, where the files printed when running the script are from both of the commits (each commit had 1 file change), so it doesn't really seem necessary to me to run the additional tests you've suggested, but can do it if you're not convinced 😅 |
Thanks for pointing this out... I had missed that comment. The list of files that have changed in the logs are very convincing. No need for extra tests |
* Add test for join on __time column (apache#11289) * chill, travis (apache#11283) * maybe make ci more selective in what it do * maybe this * skip self and travis config * can it be in before_script? lets find out * nope * fixes * oops * only skip stuff for PR builds, add some tests * revert unintended change * more comments, more tests, more better * Add configuration suggestion to `druid.indexer.storage.type` (apache#11304) Co-authored-by: Rohan Garg <7731512+rohangarg@users.noreply.github.com> Co-authored-by: Clint Wylie <cwylie@apache.org> Co-authored-by: frank chen <frank.chen021@outlook.com>
Migrating #11238 to a branch on the apache repo so I can run more tests before we merge.