Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 7 additions & 20 deletions .github/workflows/ci-image-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@ jobs:
name: "Build documentation"
runs-on: ${{ fromJSON(inputs.runners) }}
if: inputs.docs-build == 'true'
strategy:
fail-fast: false
matrix:
flag: ["--docs-only", "--spellcheck-only"]
env:
GITHUB_REPOSITORY: ${{ github.repository }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -211,11 +207,11 @@ jobs:
path: ./generated/_inventory_cache/
key: cache-docs-inventory-v1
id: restore-docs-inventory-cache
- name: "Building docs with ${{ matrix.flag }} flag"
- name: "Building docs"
env:
DOCS_LIST_AS_STRING: ${{ inputs.docs-list-as-string }}
run: >
breeze build-docs ${DOCS_LIST_AS_STRING} ${{ matrix.flag }} --refresh-airflow-inventories
breeze build-docs ${DOCS_LIST_AS_STRING} --refresh-airflow-inventories
- name: "Check for missing third-party inventories"
id: check-missing-inventories
if: always()
Expand All @@ -236,12 +232,11 @@ jobs:
id: get-job-url
if: >-
always() &&
inputs.canary-run == 'true' &&
matrix.flag == '--docs-only'
inputs.canary-run == 'true'
shell: bash
run: |
JOB_URL=$(gh api "repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs" \
--jq '[.jobs[] | select(.name | test("Build documentation.*docs-only"))][0].html_url // empty')
--jq '[.jobs[] | select(.name | test("Build documentation"))][0].html_url // empty')
if [[ -z "${JOB_URL}" ]]; then
JOB_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
fi
Expand All @@ -252,8 +247,7 @@ jobs:
id: inventory-notification
if: >-
always() &&
inputs.canary-run == 'true' &&
matrix.flag == '--docs-only'
inputs.canary-run == 'true'
shell: bash
run: python3 scripts/ci/slack_notification_state.py
env:
Expand All @@ -264,8 +258,7 @@ jobs:
- name: "Upload inventory notification state"
if: >-
always() &&
inputs.canary-run == 'true' &&
matrix.flag == '--docs-only'
inputs.canary-run == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
# yamllint disable-line rule:line-length
Expand All @@ -276,7 +269,6 @@ jobs:
- name: "Notify Slack about missing inventories (new/changed)"
if: >-
inputs.canary-run == 'true' &&
matrix.flag == '--docs-only' &&
steps.inventory-notification.outputs.action == 'notify_new'
uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0
with:
Expand All @@ -292,7 +284,6 @@ jobs:
- name: "Notify Slack about missing inventories (still not fixed)"
if: >-
inputs.canary-run == 'true' &&
matrix.flag == '--docs-only' &&
steps.inventory-notification.outputs.action == 'notify_reminder'
uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0
with:
Expand All @@ -308,7 +299,6 @@ jobs:
- name: "Notify Slack about inventory recovery"
if: >-
inputs.canary-run == 'true' &&
matrix.flag == '--docs-only' &&
steps.inventory-notification.outputs.action == 'notify_recovery'
uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0
with:
Expand All @@ -328,17 +318,14 @@ jobs:
key: cache-docs-inventory-v1
if-no-files-found: 'error'
retention-days: '2'
# If we upload from multiple matrix jobs we could end up with a race condition. so just pick one job
# to be responsible for updating it. https://github.com/actions/upload-artifact/issues/506
if: steps.restore-docs-inventory-cache.outputs.stash-hit != 'true' && matrix.flag == '--docs-only'
if: steps.restore-docs-inventory-cache.outputs.stash-hit != 'true'
- name: "Upload build docs"
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: airflow-docs
path: './generated/_build'
retention-days: '7'
if-no-files-found: 'error'
if: matrix.flag == '--docs-only'

publish-docs:
timeout-minutes: 150
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/publish-docs-to-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ jobs:
path: ./generated/_inventory_cache/
key: cache-docs-inventory-v1
id: restore-docs-inventory-cache
- name: "Building docs with --docs-only flag using ${{ inputs.ref }} reference breeze"
- name: "Building docs using ${{ inputs.ref }} reference breeze"
id: build-sphinx-docs
env:
INCLUDE_DOCS: ${{ needs.build-info.outputs.include-docs }}
Expand All @@ -375,7 +375,12 @@ jobs:
> generated/_build/docs/sphinx-build-skipped.txt
echo "sphinx-build-skipped=true" >> "${GITHUB_OUTPUT}"
else
breeze build-docs ${SPHINX_INCLUDE_DOCS} --docs-only ${FAIL_ON_INVENTORIES}
# Refs whose breeze still has --docs-only check spelling in a second full build; skip it.
DOCS_ONLY=""
if grep -q '"--docs-only"' dev/breeze/src/airflow_breeze/commands/developer_commands.py; then
DOCS_ONLY="--docs-only"
fi
breeze build-docs ${SPHINX_INCLUDE_DOCS} ${DOCS_ONLY} ${FAIL_ON_INVENTORIES}
fi
- name: "Save docs inventory cache"
uses: apache/infrastructure-actions/stash/save@61dcea11f19e2bbe1263f14d72235e8da17d3ad0 # save/v1.0.0
Expand Down
2 changes: 2 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,8 @@ repos:
^airflow-core/src/airflow/ui/openapi-gen/|
^airflow-core/src/airflow/api_fastapi/auth/managers/simple/ui/openapi-gen/|
^providers/edge3/src/airflow/providers/edge3/plugins/www/openapi-gen/|
^devel-common/src/sphinx_exts/airflow_spelling\.py$|
^devel-common/tests/unit/sphinx_exts/test_airflow_spelling\.py$|
.*/dist/.*|
\.go$|
/go\.(mod|sum)$
Expand Down
14 changes: 2 additions & 12 deletions dev/breeze/doc/03_developer_tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -251,18 +251,8 @@ To build documentation in Breeze, use the ``build-docs`` command:

Results of the build can be found in the ``generated/_build`` folder.

The documentation build consists of three steps:

* verifying consistency of indexes
* building documentation
* spell checking

You can choose only one stage of the two by providing ``--spellcheck-only`` or ``--docs-only`` after
extra ``--`` flag.

.. code-block:: bash

breeze build-docs --spellcheck-only
Spelling is checked while the documentation is built, so a single build reports both build and
spelling errors.

This process can take some time, so in order to make it shorter you can filter by package, using package
short ``provider id`` (might be multiple of them).
Expand Down
Loading
Loading