[docgen]Refine ConfigOptionsDocGenerator and fix MDX formatting#2588
[docgen]Refine ConfigOptionsDocGenerator and fix MDX formatting#2588Prajwal-banakar wants to merge 8 commits intoapache:mainfrom
Conversation
|
Hi @wuchong, I've addressed your feedback from the previous PR ( #2474 ) and continued the work here to fulfill the requirements mentioned in your #2474 (comment). I haven't removed the manual tables yet as I'm waiting for your feedback on the automated generation first! |
|
Thank you @Prajwal-banakar , I will continue to review this after 0.9 RC1 is out. Busy preparing the release. |
|
Hi Jark! Totally understand, Congratulations to the team on reaching this milestone! |
1f21a7d to
98c73f4
Compare
|
Hi @wuchong , the PR is ready for review. One thing to flag issue #2912 was raised about |
Purpose
Linked issue: close #2586
This PR refines the
ConfigOptionsDocGeneratorintroduced in #2474 to produce correct, complete MDX documentation that fully replaces the manual configuration tables inconfiguration.md. It addresses all outstanding feedback from the #2474 review.Brief change log
Annotation-driven sections: Generator now reads
@Documentation.SectionfromConfigOptions.javato group options into logical sections. Applied@Documentation.Sectionto all previously unannotatedConfigOptionfields across the entireConfigOptions.javafile.Environment-agnostic defaults: Generator reads
@Documentation.OverrideDefaultto replace system-dependent runtime values with documentation-friendly placeholders. Applied toclient.scanner.io.tmpdir,table.auto-partition.time-zone,server.buffer.wait-timeout,client.writer.buffer.wait-timeout,log.flush.interval-messages,client.lookup.max-retries,client.writer.retries, andzookeeper.client.max-buffer-size.Human-readable defaults: Wired
ConfigDocUtils.formatDefaultValue()to formatDurationvalues (including sub-second as milliseconds, e.g.100 ms) andMemorySizevalues. Near-infinite values render asinfinite.Clean type names: Fixed inner enum type rendering — strips the outer class prefix so
NoKeyAssignerrenders instead ofConfigOptionsNoKeyAssigner.List format: Output uses
###headings with bullet points instead of tables, as requested in the [doc-gen] Automate configuration documentation via fluss-docgen module #2474 review.Deprecated options: Options annotated with
@Deprecatedrender with a visible deprecation notice and remain in the documentation for reference.Replaced manual tables:
configuration.mdnow imports_partial_config.mdxvia MDX import, replacing all manually maintained tables.Removed redundant annotation files: Deleted
ConfigSection.javaandConfigOverrideDefault.javasinceConfigOptions.javauses the@Documentation.Sectionand@Documentation.OverrideDefaultinner annotationsalready defined in
Documentation.java.Tests
Manually verified by running the ConfigOptionsDocGenerator main method and inspecting the resulting _partial_config.mdx file.
ConfigOptionsDocGeneratorTestverifies the generated output includes correct sections,@OverrideDefaultvalues, human-readable Duration formatting, and absence of raw%sartifacts../mvnw compile -pl fluss-docgen -ampasses cleanly with 0 Checkstyle violations and 0 Spotless violations.API and Format
This change does not affect the Fluss runtime API or storage format. It only affects the internal documentation generation tool and the resulting .mdx files.
Documentation
This PR replaces all manually maintained configuration tables in
website/docs/maintenance/configuration.mdwith the auto-generated_partial_config.mdx. Future configuration changes inConfigOptions.javawill automatically reflect in the docs upon running the generator.