Skip to content

fix: run generated docs check on docs-only PRs#21012

Open
adp2201 wants to merge 2 commits intoapache:mainfrom
adp2201:ap/fix-generated-docs-ci
Open

fix: run generated docs check on docs-only PRs#21012
adp2201 wants to merge 2 commits intoapache:mainfrom
adp2201:ap/fix-generated-docs-ci

Conversation

@adp2201
Copy link

@adp2201 adp2201 commented Mar 17, 2026

Which issue does this PR close?

Closes #19095

Rationale for this change

The generated-doc drift check currently lives in rust.yml, but rust.yml ignores docs-only and markdown-only PRs via paths-ignore:

  • docs/**
  • **.md

That means a PR can directly edit autogenerated files such as:

  • docs/source/user-guide/configs.md
  • docs/source/user-guide/sql/aggregate_functions.md
  • docs/source/user-guide/sql/scalar_functions.md
  • docs/source/user-guide/sql/window_functions.md

and still pass CI, because the workflow that runs:

  • ./dev/update_config_docs.sh
  • ./dev/update_function_docs.sh

never executes.

I reproduced this locally and summarized the findings on the issue:

What changes are included in this PR?

  1. Add a dedicated Generated Docs workflow in .github/workflows/docs_generated.yaml
  2. Trigger that workflow on:
    • generated doc files
    • generator scripts
    • ci/scripts/utils/tool_versions.sh
    • datafusion/**
    • the workflow file and setup actions it depends on
  3. Preserve the existing job name:
    • check configs.md and ***_functions.md is up-to-date
  4. Remove the old generated-doc check job from rust.yml

This keeps rust.yml path filtering unchanged while ensuring docs-only edits to autogenerated files still run the drift check.

Are these changes tested?

Yes, locally:

  • Parsed workflow YAML successfully with PyYAML
  • Verified trigger behavior for:
    • generated docs edits
    • ordinary docs edits
    • source/script/setup changes
  • Ran:
    • ./dev/update_config_docs.sh
    • ./dev/update_function_docs.sh
  • Confirmed both commands exited successfully and produced no diffs in generated docs

Are there any user-facing changes?

No. This is CI/process-only.

@github-actions github-actions bot added the development-process Related to development process of DataFusion label Mar 17, 2026
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

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

development-process Related to development process of DataFusion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Run config_docs CI check is not run on PRs to only change generated docs (resulting in CI failures)

1 participant