From 6011676d19eda9aeba9f9edc9a38d2f4b3de9758 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Tue, 5 Aug 2025 16:01:07 -0400 Subject: [PATCH 1/4] Run generated docs checks on changes to md files too --- .github/workflows/docs_generated.yaml | 78 +++++++++++++++++++++++++++ .github/workflows/rust.yml | 28 ---------- 2 files changed, 78 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/docs_generated.yaml diff --git a/.github/workflows/docs_generated.yaml b/.github/workflows/docs_generated.yaml new file mode 100644 index 000000000000..ca8dc0c84806 --- /dev/null +++ b/.github/workflows/docs_generated.yaml @@ -0,0 +1,78 @@ + +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Generated Docs Check + +concurrency: + group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} + cancel-in-progress: true + +on: + push: + paths: + - ".github/**" + - "datafusion/**" + - "dev/update_config_docs.sh" + - "dev/update_function_docs.sh" + - "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" + pull_request: + paths: + - ".github/**" + - "datafusion/**" + - "dev/update_config_docs.sh" + - "dev/update_function_docs.sh" + - "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" + # manual trigger + # https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow + workflow_dispatch: + + +generated-docs-check: + name: check configs.md and ***_functions.md is up-to-date + needs: linux-build-lib + runs-on: ubuntu-latest + container: + image: amd64/rust + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + submodules: true + fetch-depth: 1 + - name: Setup Rust toolchain + uses: ./.github/actions/setup-builder + with: + rust-version: stable + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.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 \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 07fe9ede7c60..44287f8dc918 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -702,34 +702,6 @@ jobs: - name: Check Cargo.toml formatting run: taplo format --check - config-docs-check: - name: check configs.md and ***_functions.md is up-to-date - needs: linux-build-lib - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - submodules: true - fetch-depth: 1 - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.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 # Verify MSRV for the crates which are directly used by other projects: # - datafusion From a2e40e9872a3487b41141ad3a9b16822394fe8b7 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Tue, 5 Aug 2025 16:49:54 -0400 Subject: [PATCH 2/4] fix --- .github/workflows/docs_generated.yaml | 60 +++++++++++++-------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/.github/workflows/docs_generated.yaml b/.github/workflows/docs_generated.yaml index ca8dc0c84806..f8afe5044bd9 100644 --- a/.github/workflows/docs_generated.yaml +++ b/.github/workflows/docs_generated.yaml @@ -16,7 +16,7 @@ # specific language governing permissions and limitations # under the License. -name: Generated Docs Check +name: Generated Docs concurrency: group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }} @@ -47,32 +47,32 @@ on: # https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow workflow_dispatch: - -generated-docs-check: - name: check configs.md and ***_functions.md is up-to-date - needs: linux-build-lib - runs-on: ubuntu-latest - container: - image: amd64/rust - steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - submodules: true - fetch-depth: 1 - - name: Setup Rust toolchain - uses: ./.github/actions/setup-builder - with: - rust-version: stable - - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.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 \ No newline at end of file +jobs: + generated-docs-check: + name: check configs.md and ***_functions.md is up-to-date + needs: linux-build-lib + runs-on: ubuntu-latest + container: + image: amd64/rust + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + submodules: true + fetch-depth: 1 + - name: Setup Rust toolchain + uses: ./.github/actions/setup-builder + with: + rust-version: stable + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.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 \ No newline at end of file From dd21cf3ad2463703b022e7925ffcb7575c890c46 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Tue, 5 Aug 2025 16:51:52 -0400 Subject: [PATCH 3/4] fix --- .github/workflows/docs_generated.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docs_generated.yaml b/.github/workflows/docs_generated.yaml index f8afe5044bd9..1a489f98d3da 100644 --- a/.github/workflows/docs_generated.yaml +++ b/.github/workflows/docs_generated.yaml @@ -50,7 +50,6 @@ on: jobs: generated-docs-check: name: check configs.md and ***_functions.md is up-to-date - needs: linux-build-lib runs-on: ubuntu-latest container: image: amd64/rust From 1f87c33d0ef982d9931795e29486dde964c46b42 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Fri, 8 Aug 2025 14:43:18 -0400 Subject: [PATCH 4/4] Update .github/workflows/docs_generated.yaml Co-authored-by: Piotr Findeisen --- .github/workflows/docs_generated.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docs_generated.yaml b/.github/workflows/docs_generated.yaml index 1a489f98d3da..f25d76ff9caa 100644 --- a/.github/workflows/docs_generated.yaml +++ b/.github/workflows/docs_generated.yaml @@ -1,4 +1,3 @@ - # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information