MartijnVisser opened a new pull request, #30049:
URL: https://github.com/apache/flink/pull/30049

   ## What is the purpose of the change
   
   The license check never looks at the code Netty embeds in its own classes 
and native libraries, which is how FLINK-41538 went unnoticed. This needs 
#30000 first, and #30001-#30004 on the release branches. Connectors run 
flink-ci-tools at their Flink version, so they get the check too. Native 
libraries beyond Netty and Conscrypt are FLINK-41592.
   
   ## Brief change log
   
   - `EmbeddedCodeChecker` fails a jar that contains code embedded by Netty or 
Conscrypt without the license file or NOTICE attribution it needs, or ships 
such a license file without the code
   - `NoticeParser` rejects a dependency line with the version before the 
classifier
   - `JarFileChecker` fails when a NOTICE refers to a `licenses/` file the jar 
doesn't ship
   
   ## Verifying this change
   
   This change added tests and can be verified as follows:
   
   - Unit tests for each kind of rule, relocations, nested jars, the version 
gate, the parser and the reference check
   - `LicenseChecker` on the jars of master, 2.4, 2.3, 2.2 and 1.20 and of the 
2.3.0, 2.2.1 and 1.20.5 releases: 78 to 94 errors each before #30000-#30004, 
none after. The current checker passes all of them.
   - Undoing each change of #30000-#30004 on its own fails every owed NOTICE 
attribution and 268 of 294 license files. The other 26 are license files 
flink-rpc-akka shipped for code it doesn't contain.
   - Jars built from Netty 4.1.64, 4.1.66, 4.1.130, 4.1.131 and 4.2.17 pass 
with their licenses and fail without. A 4.2.22 jar fails the version gate.
   - Of the 228 jars of a master build, only three e2e test jars newly fail, 
and those aren't deployed
   - `NoticeParser` over every source NOTICE flags nothing on the heads of 
#30000-#30004, and before them only the flink-python epoll line that 2.3, 2.2 
and 1.20 have carried since FLINK-29196
   - These runs had no deploy log, so the NOTICE half of the check on a real 
build is covered by CI only
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code 2.1.329 (Claude Opus 5.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