Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IT-related changes pulled out of PR #12368 #12673

Merged
merged 3 commits into from
Jun 25, 2022
Merged

Conversation

paul-rogers
Copy link
Contributor

The new IT PR has struggled to get a clean build due to the complexity and flakiness of the Druid build system. It is ironic that the attempt to fix the ITs has been stymied by the fragility of the existing ITs. Out of desperation, the big PR is being broken up into smaller chunks. This one provides changes made to the existing ITs to support the new ITs.

The first set of changes make the "custom node role" code usable by the new ITs. No functional change, just some clean-up. There are also some documentation updates.

The second change is more substantial. The new ITs use the "failsafe" Maven plugin, which is the sister plugin to the "failsafe" plugin Druid uses for unit tests (UTs). The venerable -DskipTests flag will thus skip both ITs and UTs. But, when running the new ITs, we want to skip the UTs, but run the ITs. A common solution is to use separate flags for ITs and UTs.

  • -DskipITs skips the integration tests but runs unit tests.
  • -DskipUTs skips unit tests but runs the "new" integration tests.

The existing Druid profile, -P skip-tests is expanded to skip both ITs and UTs.

In this PR, -DskipTests and -DskipUTs have the same effect. However, once the new ITs are in place, the meanings will differ, as explained above.

The key purpose of this PR is to test the new setup in Travis separately from the other changes in PR #12368.


This PR has:

  • been self-reviewed.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • has been tested in the Travis Druid build (the purpose of this PR.)

Copy link
Contributor

@cryptoe cryptoe left a comment

Choose a reason for hiding this comment

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

LGTM!! Thanks, @paul-rogers for taking the lead and fixing up the IT's.

Copy link
Contributor

@kfaraz kfaraz left a comment

Choose a reason for hiding this comment

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

Thanks for the detailed description, @paul-rogers !
I have added some minor comments.

.travis.yml Outdated
@@ -34,8 +34,8 @@ env:
- DOCKER_IP=127.0.0.1 # for integration tests
- MVN="mvn -B"
- > # Various options to make execution of maven goals faster (e.g., mvn install)
MAVEN_SKIP="-Pskip-static-checks -Ddruid.console.skip=true -Dmaven.javadoc.skip=true"
- MAVEN_SKIP_TESTS="-Pskip-tests"
MAVEN_SKIP="-P skip-static-checks -Ddruid.console.skip=true -Dmaven.javadoc.skip=true"
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting. These lines should be in conflict with #12672 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. These are the same changes as #12672, and disappeared when I rebased on the latest master.

Add `-rf :druid-integration-tests` when running integration tests for the second time or later without changing
Parameters:

* Test Group: Required, as certain test setup and cleanup tasks are based on the test group. You can find
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit:

Suggested change
* Test Group: Required, as certain test setup and cleanup tasks are based on the test group. You can find
* Test Group: Required, as certain test setups and cleanup tasks are based on the test group. You can find

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps this is ambiguous. I read this as "setup ... tasks". You maybe saw it as "setups AND (cleanup tasks)". Reworded to avoid the ambiguity.

Note that when bringing up Docker containers through Maven and `-Doverride.config.path` is provided, additional
Druid routers for security group integration test (permissive tls, no client auth tls, custom check tls) will not be started.

### Debugging Test Runs
Copy link
Contributor

Choose a reason for hiding this comment

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

Side note: All of these seem to be very helpful bits of information. I wonder if we should have a "Developer" section in the Druid docs and capture all such information there too. I sometimes find it easier to read docs than have to open the README on GitHub or on an IDE.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great suggestion. To avoid redundant work, let's do that when we merge the "new" IT framework, since the steps will differ.

@paul-rogers
Copy link
Contributor Author

Build is basically clean except for an unrelated IT failure. @kfaraz please either restart that test, or use your judgment that the failure is not relevant to the changes here.

@kfaraz kfaraz merged commit f83fab6 into apache:master Jun 25, 2022
@kfaraz
Copy link
Contributor

kfaraz commented Jun 25, 2022

Thanks for the changes, @paul-rogers . I have merged the PR.

@abhishekagarwal87 abhishekagarwal87 added this to the 24.0.0 milestone Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants