Automated generation of configs.md #2777
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #2770.
Rationale for this change
What changes are included in this PR?
print_config_docsto datafusion core which generates the config markdown table and prints it.dev(should this be indocsinstead?) which runs this binary to update theconfigs.mdfile.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.rsbut 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?