Skip to content

Conversation

@mirober
Copy link
Contributor

@mirober mirober commented Jun 23, 2022

Which issue does this PR close?

Closes #2770.

Rationale for this change

What changes are included in this PR?

  • Added a binary - print_config_docs to datafusion core which generates the config markdown table and prints it.
  • Added a script to dev (should this be in docs instead?) which runs this binary to update the configs.md file.

Posting this as a draft because I'm not sure yet what the best plan is for fully automating updates to the config documentation. I looked into build.rs but I'm not sure it's the right fit for this since it runs before compilation and can't import from the module it is part of.

One idea I had was to run the script in a github action alongside the tests. If the action runs and there are changes to configs.md, it could suggest the diff on the PR and then fail. It would then be a single click to update the PR to include the changes and restart the tests. There are a few actions on the marketplace for doing this, this one looks promising: https://github.com/marketplace/actions/action-git-diff-suggestions. Open to thoughts and alternatives 🙂 Edit doesn't look like this will work as I had hoped, since Github doesn't allow suggestions on files that haven't been touched by the PR. Maybe the best we can do is to fail if there are changes that need making.

Are there any user-facing changes?

@github-actions github-actions bot added core Core DataFusion crate development-process Related to development process of DataFusion labels Jun 23, 2022
@andygrove
Copy link
Member

Thank you @mrob95. This looks great. I tried out the changes locally.

Minor nit: could you use underscores in the script filename for consistency with the other scripts.

I like the idea of CI failing if there is a diff in the generated docs but that can be handled in a separate PR.

@mirober mirober changed the title Draft: Automated generation of configs.md Automated generation of configs.md Jun 24, 2022
@mirober
Copy link
Contributor Author

mirober commented Jun 24, 2022

Minor nit: could you use underscores in the script filename for consistency with the other scripts.

Done 👍

Copy link
Member

@xudong963 xudong963 left a comment

Choose a reason for hiding this comment

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

LGTM, thank you @mrob95

@xudong963 xudong963 merged commit 11ae737 into apache:master Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate development-process Related to development process of DataFusion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically update configs.md in user guide

3 participants