fluss icon indicating copy to clipboard operation
fluss copied to clipboard

[docs][build] Complete automatic configuration documentation generation

Open pbanakar opened this issue 9 months ago • 1 comments

Search before asking

  • [x] I searched in the issues and found nothing similar.

Description

Description Task: Improve the ConfigOptionsDocGenerator to ensure the auto-generated configuration documentation is professional, accurate, and free of formatting artifacts.

Purpose: The current documentation generator had several minor issues that impacted the readability of the official docs.

Willingness to contribute

  • [x] I'm willing to submit a PR!

pbanakar avatar Feb 06 '26 08:02 pbanakar

The previous implementation in #2588 is now outdated: the current branch has changed, ConfigOptions.java has been updated, configuration.md still contains the manual reference, and the generated _partial_config.mdx file is now ignored.

I'm thinking to start a fresh work from the current main branch instead of resolving the old branch conflicts directly.

Since #4578 proposes refactoring ConfigOptions to address the Checkstyle file-length limit, I think the implementation plan should be updated before continuing, and this plan follows @wuchong guidance in #2474 #issuecomment. The current generator relies on ConfigOptions.class.getDeclaredFields(), so splitting the options into multiple classes could cause some options to be missed.

Proposed plan

  1. Coordinate with #4578 and define the new configuration-option structure while preserving existing keys, defaults, deprecated aliases, public constant references, and metadata.
  2. Update fluss-docgen to discover options from all relevant option-holder classes through a stable and deterministic mechanism, rather than scanning only ConfigOptions.class.
  3. Generate list-style MDX documentation with sections, documentation-only default overrides, type/default formatting, deprecated-option markers, and safe MDX escaping.
  4. Replace the manually maintained configuration reference with an import of the generated partial, while keeping _partial_config.mdx ignored.
  5. Add an explicit generation step before the Docusaurus build so CI and clean checkouts create the ignored file automatically.
  6. Add tests verifying that all options are discovered exactly once and that the generated documentation remains complete after the ConfigOptions refactor.
  7. Remove the temporary Checkstyle suppression from #4579 after the refactor is complete.

I wait for the direction of #4578 before starting a fresh PR from the current main, so the generator is not implemented against a structure that may soon change. I also plan to divide the work into smaller PRs to make the changes easier to review. I’d appreciate the feedback on this approach. cc @wuchong @swuferhong @polyzos

pbanakar avatar Oct 29 '26 10:10 pbanakar