MartijnVisser opened a new pull request, #59:
URL: https://github.com/apache/flink-connector-shared-utils/pull/59

   ## What is the purpose of the change
   
   Prerequisite for bumping connectors to Maven 3.9 
(apache/flink-connector-kafka#319, FLINK-40629).
   
   Maven 3.9 prints mojo banners using the plugin's goal prefix 
(`deploy:3.1.4:deploy`) instead of its artifactId 
(`maven-deploy-plugin:3.1.4:deploy`). `flink-ci-tools`' `DeployParser` and 
`DependencyParser` match only the artifactId spelling, and no released 
`flink-ci-tools` carries the parser fix from FLINK-40459 — the newest on 
Central is 2.3.0, and connectors pin it to their `flink.version`.
   
   The result is not a build failure. `ShadeParser` keeps working, so 
shaded-module data is still extracted, but `DeployParser` returns nothing, 
every shading module counts as "skipping deployment", and 
`ensureRequiredNoticeFiles` ends up checking nothing. Every NOTICE entry is 
then reported as "Dependency X is not bundled, but listed" at 
`Severity.TOLERATED`, which is not counted as severe, so the job stays green. 
`JarFileChecker` still runs, so it is not a complete no-op — but the NOTICE 
half drops to zero coverage silently.
   
   Measured on flink-connector-kafka, same tree, only Maven differing:
   
   ```
   Maven 3.8.6   -> Extracted 4 modules that were deployed and 7 modules which 
bundle dependencies
   Maven 3.9.16  -> Extracted 0 modules that were deployed and 7 modules which 
bundle dependencies
   ```
   
   Both exit 0.
   
   ## Brief change log
   
   - Rewrite the two affected banners back to the 3.8 spelling before the 
license check. This is a no-op on Maven 3.8, and flink master's parsers accept 
both spellings, so it is safe to leave in place during the transition. 
Removable once connectors depend on a `flink-ci-tools` release containing the 
FLINK-40459 parser fix.
   - Assert a non-zero module count so a check that inspected nothing fails 
instead of passing.
   - Supply a log4j config for the license step rather than reusing the repo's 
`tools/ci/log4j.properties`. That file differs per connector and per release 
branch — `flink-connector-jdbc` sets `rootLogger.level = OFF`, and 
`flink-connector-kafka` `v3.4` and `v4.0` shadow `org.apache.flink` at WARN — 
so it cannot be relied on to surface the checker's own output that the 
assertion reads. Without this the assertion would fail healthy builds in those 
repos.
   - Separately: `python_ci.yml` reads `maven-version` from `env.MAVEN_VERSION` 
but nothing ever sets it, so the Python job always used the hardcoded 3.8.6 
fallback while `compile_and_test` used the wrapper's version. Add the "Read 
maven version" step `ci.yml` already has.
   
   ## Verifying this change
   
   Verified against real build logs from flink-connector-kafka, by extracting 
the step scripts from the workflow and running them:
   
   - Degraded Maven 3.9 log: guard exits 1 (correctly caught).
   - Normalised Maven 3.9 log: guard exits 0, and the checker reports the same 
4 modules as a 3.8.6 run.
   - Maven 3.8.6 baseline log: guard exits 0.
   - A `rootLogger.level = OFF` config as used by `flink-connector-jdbc`: with 
the step-supplied log config the checker's output is present and the guard 
passes; without it, it would have failed a healthy build.
   - The `sed` is byte-identical no-op on a Maven 3.8.6 build log, and is 
anchored to `^\[INFO\] --- ` so it cannot touch anything else on the line.
   
   ## Note for reviewers
   
   Connectors still on Maven 3.8.6 are unaffected: the normalisation matches 
nothing and the assertion passes as before.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code 2.1.267 (Claude Opus 5)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to