Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: provide a tool for generating config docs #14727

Merged
merged 18 commits into from
Feb 5, 2024
Merged

Conversation

neverchanje
Copy link
Contributor

@neverchanje neverchanje commented Jan 22, 2024

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

To provide an automation tool that can help generate an up-to-date document for configurations.
This tool does not require a separate command. Instead, it reuses ./risedev generate-example-config.
The result can be copied without modification into our official doc upon every version release.

A follow-up task is to refine the rustdoc for important configurations, which are supposed to be maintained by developers instead of the doc team.

In addition, we may need to figure out an approach to extract the possible options for each config. We currently can only extract default values. For example, there is no annoation to indicates default_parallelism's other options except for 'full',

Checklist

  • I have written necessary rustdoc comments
  • I have added necessary unit tests and integration tests
  • All checks passed in ./risedev check (or alias, ./risedev c)

Documentation

https://github.com/risingwavelabs/risingwave-docs/issues/997

@neverchanje neverchanje changed the title Wt config doc chore: provide a tool for generating config docs Jan 22, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

license-eye has totally checked 4760 files.

Valid Invalid Ignored Fixed
2073 1 2686 0
Click to see the invalid file list
  • src/common/proc_macro/src/config_doc.rs

src/common/proc_macro/src/config_doc.rs Show resolved Hide resolved
@neverchanje neverchanje marked this pull request as ready for review January 22, 2024 16:49
@neverchanje neverchanje requested a review from a team as a code owner January 22, 2024 16:49
src/common/proc_macro/src/lib.rs Outdated Show resolved Hide resolved
src/common/proc_macro/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@BugenZhao BugenZhao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM.

  • Shall we apply the same ordering as example.toml?
  • Should we include the developer configs?

@neverchanje
Copy link
Contributor Author

neverchanje commented Jan 25, 2024

I am not sure what ordering does example.toml use. But it'll be fine if they aren't consistent.

Should we include the developer configs?

The thing is, 'developer' configs somehow have prefixes like 'streaming_' or 'batch_' that make the toml configs unaligned with the rustdoc.

When the tool extracts rustdoc (comments), it's unware that a field xxx in streaming developer configs will be prefixed as "streaming_xxx", which cannot be found within the config table generated by ConfigDoc macro.

Copy link

gitguardian bot commented Feb 4, 2024

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
9425213 Triggered Generic Password d4804d2 ci/scripts/regress-test.sh View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

Copy link
Member

@xxchan xxchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@neverchanje neverchanje enabled auto-merge February 5, 2024 06:57
@neverchanje neverchanje added this pull request to the merge queue Feb 5, 2024
Merged via the queue into main with commit aa06e50 Feb 5, 2024
27 of 28 checks passed
@neverchanje neverchanje deleted the wt-config-doc branch February 5, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants