Centralize the Surefire --add-opens flags in flume-parent - #502
Merged
Merged
Conversation
Several test suites reflect into JDK internals: the `EnvironmentVariables` rule of `system-rules` and `AbstractSSLUtilTest` need `java.lang` and `java.util`, the HBase test utilities also need `java.lang.reflect`, and the Kudu test utilities install a fake DNS through `java.net`. Move the union of these opens to the Surefire `argLine` of `flume-parent`, so that modules in this repository and in the satellite repositories no longer need to repeat them. The per-module `argLine` overrides of `flume-ng-node`, `flume-ng-sdk` and `flume-ng-environment-variable-config-filter` are removed, as the parent now covers them. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com>
ppkarwasz
enabled auto-merge (squash)
September 16, 2026 13:03
ppkarwasz
added a commit
to apache/logging-flume-hadoop
that referenced
this pull request
Sep 16, 2026
The `--add-opens` flags needed by the tests of the credential store config filter, the HBase2 sink and the Kudu sink are now provided by the Surefire `argLine` of `flume-parent` (apache/logging-flume#502), which also adds the `java.base/java.lang` opens required by the `EnvironmentVariables` rule on Windows. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com>
ppkarwasz
added a commit
to apache/logging-flume-hadoop
that referenced
this pull request
Sep 17, 2026
The `--add-opens` flags needed by the tests of the credential store config filter, the HBase2 sink and the Kudu sink are now provided by the Surefire `argLine` of `flume-parent` (apache/logging-flume#502), which also adds the `java.base/java.lang` opens required by the `EnvironmentVariables` rule on Windows. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com>
ppkarwasz
added a commit
to apache/logging-flume-hadoop
that referenced
this pull request
Sep 17, 2026
* Simplify POM files Reparent from `org.apache:apache` to `flume-parent`, use `${revision}` for the project version, fix the `<scm>` block, which pointed at `flume-spring-boot`, and remove everything the parent chain already provides: the Flume 1.11.1-SNAPSHOT BOM, the Hadoop, Guava, Jackson, SLF4J, Log4j, JUnit, Mockito and system-rules versions, the RAT plugin (excludes move to `.rat-excludes`), the `apache-release` profile and the dead dependency management entries. HBase, Hive, Kudu, Avro and `commons-lang` stay. The `flume-hadoop-dist` module is removed: the reusable release workflow produces the source distribution. Changes required by Flume 2.x, Java 17 and the `logging-parent` checks: - `log4j-slf4j-impl` becomes `log4j-slf4j2-impl`; `log4j-1.2-api` is banned by the `flume-parent` enforcer rule and dropped. Hive 3 itself uses Log4j 2, so `flume-hive-sink` allows it in `provided` and `test` scope. - Jetty is pinned to the 9.4 line used by Hadoop: the Jetty 12 managed by `flume-parent` breaks the Hadoop mini cluster. - `junit-jupiter-api` is added to the HBase and HDFS tests, since the Hadoop 3.5 test utilities use JUnit 5 assertions; `curator-client` is managed to satisfy the upper bound rule; Avro moves to the 1.11.5 used by Hadoop. - The Hive tests get Derby (10.16, as 10.17 requires Java 21, and the driver now lives in `derbytools`); the HDFS tests get `flume-rpc-avro`, where the Flume event Avro serializer now lives. - The `--add-opens` Surefire arguments that were commented out "for Java 11+" are restored, and the Kudu tests open `java.net` for the fake DNS. - The `linux` profile activates on `amd64`, so `flume-kudu-sink` actually builds on 64-bit Linux; `kudu-binary` only exists for x86_64. - `.mvn/jvm.config` provides the `--add-exports` flags Error Prone needs and the temporary `use-apache-snapshots` profile, activated through `.mvn/maven.config`, resolves the unreleased parent. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6 * Expand wildcard imports The `logging-parent` enforcer rules ban wildcard imports. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6 * Adapt sources to Flume 2.x, Java 17 and Error Prone - `ChannelException` moved to `org.apache.flume.exception`. - The Avro serializer configuration constants moved to `flume-rpc-avro`; the HDFS `AvroEventSerializer` now declares the six keys it uses itself. - Flume 2.x resolves sinks outside the main repository by class name only, so `TestHBase2SinkCreation` uses the class name instead of the `hbase2` alias, and the HDFS tests name `FlumeEventAvroEventSerializer` instead of the `AVRO_EVENT` alias (whose class name is wrong in `EventSerializerType`). - Error Prone: byte arrays are printed as strings in `TestHBase2Sink`, `BucketWriter` locks on a plain `Object` instead of a boxed `Integer`, and `RegexpKuduOperationsProducer` uses `%s` placeholders with Guava's `Preconditions`. The last remaining wildcard import is expanded. - Hadoop 3.5 requires a configured codec, so `TestUseRawLocalFileSystem` configures the `GzipCodec` it constructs. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6 * Update `.gitignore`, `.gitattributes`, `README.md` and `NOTICE.txt` The NOTICE said "Apache Flume Spring Boot". The README gains the project status warning of the main repository, the Java 17 build requirements and the right issue tracker link. `checkstyle-header.txt` and `findbugs-exclude-filter.xml` were referenced by no plugin. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6 * Add GitHub Actions workflows from `logging-flume` Port the `build`, CodeQL and Dependabot workflows and the Dependabot configuration from the main Flume repository, adapted to this repository: `main` default branch, no Maven site, Java only and `flume-hadoop` as the distribution identifier. Fix the required status check name in `.asf.yaml`: the reusable build workflow reports it as `build / build (ubuntu-latest)`. Until that change is on `main`, a temporary job named `build (ubuntu-latest)` satisfies the ruleset currently in force. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6 * Generate release notes with `log4j-changelog` Bootstrap `src/changelog` with the templates used by the other Logging Services projects and a single entry for the upcoming first release. The hand-written `CHANGELOG` and `RELEASE-NOTES.txt` are superseded by the generated release notes. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6 * Move the Derby metastore of the Hive tests out of `src` Spotless formats every `src/**/*.properties` file and would add a license header to Derby's `service.properties`, which Derby forbids editing. The snapshot is not a Maven resource: the POM copies it to `target/derby` itself. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6 * Tighten the SpotBugs and PMD violation limits to the current counts Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F9NiqMnCccUGDtqt64uKe6 * Remove the per-module Surefire `--add-opens` flags The `--add-opens` flags needed by the tests of the credential store config filter, the HBase2 sink and the Kudu sink are now provided by the Surefire `argLine` of `flume-parent` (apache/logging-flume#502), which also adds the `java.base/java.lang` opens required by the `EnvironmentVariables` rule on Windows. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> * Fix the credential store tests on Windows The tests built the provider path by prepending `jceks://file/` to an absolute file path, which is not a valid URI on Windows, where the path contains a drive letter and backslashes. The keystores were therefore never created and the tests failed. The path is now derived from the `file:` URI of the temporary file. Hadoop's keystore providers also read and set file permissions through `winutils.exe` on Windows, which is not available on the CI runners, so the test class is skipped there. Assisted-By: Claude Fable 5.1 <noreply@anthropic.com> * Skip the tests on Windows Hadoop needs `winutils.exe` and `hadoop.dll` to access the local file system on Windows. The Apache Hadoop project does not distribute these binaries and the third-party builds have no provenance, so the tests are skipped on Windows through an OS-activated profile. Compilation, packaging and static analysis still run there. Assisted-By: Claude Fable 5.1 <noreply@anthropic.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.
Several test suites reflect into JDK internals on Java 16+: the
EnvironmentVariablesrule ofsystem-rulesandAbstractSSLUtilTestneedjava.langandjava.util, the HBase test utilities also needjava.lang.reflect, and the Kudu test utilities install a fake DNS throughjava.net.This PR moves the union of these opens to the Surefire
argLineofflume-parent, so that modules in this repository and in the satellite repositories (e.g.logging-flume-hadoop, see apache/logging-flume-hadoop#4) no longer need to repeat them. The per-moduleargLineoverrides offlume-ng-node,flume-ng-sdkandflume-ng-environment-variable-config-filterare removed, since the parent now covers them.The
java.langopens is what theEnvironmentVariablesrule needs on Windows, where it patchesProcessEnvironment.theCaseInsensitiveEnvironment.🤖 Generated with Claude Code