fix: run generated docs check on docs-only PRs#21012
Open
adp2201 wants to merge 2 commits intoapache:mainfrom
Open
fix: run generated docs check on docs-only PRs#21012adp2201 wants to merge 2 commits intoapache:mainfrom
adp2201 wants to merge 2 commits intoapache:mainfrom
Conversation
Comment on lines
+55
to
+81
| name: check configs.md and ***_functions.md is up-to-date | ||
| runs-on: ${{ github.repository_owner == 'apache' && format('runs-on={0},family=m8a+m7a+c8a,cpu=16,image=ubuntu24-full-x64,extras=s3-cache,disk=large,tag=datafusion', github.run_id) || 'ubuntu-latest' }} | ||
| container: | ||
| image: amd64/rust | ||
| steps: | ||
| - uses: runs-on/action@cd2b598b0515d39d78c38a02d529db87d2196d1e # v2.0.3 | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| submodules: true | ||
| fetch-depth: 1 | ||
| - name: Setup Rust toolchain | ||
| uses: ./.github/actions/setup-builder | ||
| with: | ||
| rust-version: stable | ||
| - uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | ||
| with: | ||
| node-version: "20" | ||
| - name: Check if configs.md has been modified | ||
| run: | | ||
| # If you encounter an error, run './dev/update_config_docs.sh' and commit | ||
| ./dev/update_config_docs.sh | ||
| git diff --exit-code | ||
| - name: Check if any of the ***_functions.md has been modified | ||
| run: | | ||
| # If you encounter an error, run './dev/update_function_docs.sh' and commit | ||
| ./dev/update_function_docs.sh | ||
| git diff --exit-code |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #19095
Rationale for this change
The generated-doc drift check currently lives in
rust.yml, butrust.ymlignores docs-only and markdown-only PRs viapaths-ignore:docs/****.mdThat means a PR can directly edit autogenerated files such as:
docs/source/user-guide/configs.mddocs/source/user-guide/sql/aggregate_functions.mddocs/source/user-guide/sql/scalar_functions.mddocs/source/user-guide/sql/window_functions.mdand still pass CI, because the workflow that runs:
./dev/update_config_docs.sh./dev/update_function_docs.shnever executes.
I reproduced this locally and summarized the findings on the issue:
What changes are included in this PR?
Generated Docsworkflow in.github/workflows/docs_generated.yamlci/scripts/utils/tool_versions.shdatafusion/**check configs.md and ***_functions.md is up-to-daterust.ymlThis keeps
rust.ymlpath filtering unchanged while ensuring docs-only edits to autogenerated files still run the drift check.Are these changes tested?
Yes, locally:
PyYAML./dev/update_config_docs.sh./dev/update_function_docs.shAre there any user-facing changes?
No. This is CI/process-only.