Repository navigation
Conversation
…lasspath FlinkMaterializedTableOptions, introduced by apache#11551, references Flink's IntervalFreshness and CatalogMaterializedTable enums in its static initializer. The docs generator and the completeness ITCase load every scanned *Options class with Class.forName, but paimon-docs has paimon-flink-common only in provided scope and no Flink dependency, so loading that class fails with NoClassDefFoundError and master's 'Core and integrations' lanes fail, along with every open PR merging with current master. Skip the class with a warning instead: an options class that cannot be loaded contributes no documentable options, and all options of the class triggering this are annotated with ExcludeFromDocumentation.
JingsongLi
left a comment
There was a problem hiding this comment.
[P2] Keep documented options visible to the completeness check
ConfigOptionsDocsCompletenessITCase.findExistingOptions uses the same scanner. If the initializer of a class with a public, documentable option needs an engine dependency absent from the docs classpath, the catch skips that class in both generation and validation. I ran a fixture with a public review.engine.mode option whose default needed the missing Flink enum. The parent failed with NoClassDefFoundError. This head returned an empty set, so the completeness check has no missing option to report. Scanner
Please consider loading classes without initialization, as in #11560, and leaving failures visible when reading a documentable field. All of FlinkMaterializedTableOptions' fields are already excluded, so they can be filtered before the class is initialized.
I ran ConfigOptionsDocGeneratorTest and ConfigOptionsDocsCompletenessITCase together on 43924dcf1f with JDK 11. All 11 tests passed.
Problem
Master's
Java / Core and integrationslanes are red, and so is every open PR merging with current master.ConfigOptionsDocsCompletenessITCasefails with:#11551moved the materialized table refresh options intoFlinkMaterializedTableOptions, whose static initializer references Flink'sIntervalFreshnessandCatalogMaterializedTableenums. The docs generator and the completeness ITCaseClass.forNameevery scanned*Optionsclass, butpaimon-docshaspaimon-flink-commoninprovidedscope and no Flink dependency, so the class fails to initialize.Evidence: master run 46392316689, job
Java / Core and integrations / JDK 11, same failure (the run was merged with a failing CI); the same failure also shows up in unrelated open PRs, e.g. #11563.Change
processConfigOptionsnow skips a scanned options class whose dependencies are missing from the classpath (NoClassDefFoundError) and logs a warning. An options class that cannot be loaded contributes no documentable options, and every option of the class triggering this is already annotated with@ExcludeFromDocumentation.Tests
ConfigOptionsDocGeneratorTest#testProcessConfigOptionsSkipsClassesWithMissingDependencies: a consumer failing withNoClassDefFoundErrorfor one class must not abort the scan.ConfigOptionsDocsCompletenessITCasepasses locally against this branch (it fails on master with the stack above).