This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch fix-publish-docs-no-auto-java-sdk
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 529b7b2940a41028aee7514cfbeb2d8560017a4b
Author: Jarek Potiuk <[email protected]>
AuthorDate: Mon Jun 8 15:29:51 2026 +0200

    Do not auto-add Java SDK Javadoc when a package list is passed to 
publish-docs
    
    When a specific list of packages (e.g. a provider release wave like
    "amazon cncf.kubernetes ...") is passed to the publish-docs-to-s3 workflow,
    the Java SDK Javadoc was still built and appended to the S3 publish set
    whenever java-sdk/ existed at the ref. That dragged java-sdk into a
    providers-only publish and made the "Publish documentation to S3" job fail.
    
    The Java SDK Javadoc is now only built/published for full doc builds
    (include-docs == 'all') or when 'java-sdk' is explicitly requested.
---
 .github/workflows/publish-docs-to-s3.yml | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/publish-docs-to-s3.yml 
b/.github/workflows/publish-docs-to-s3.yml
index 7d01cc6f9bc..7afff16969b 100644
--- a/.github/workflows/publish-docs-to-s3.yml
+++ b/.github/workflows/publish-docs-to-s3.yml
@@ -366,12 +366,22 @@ jobs:
         with:
           persist-credentials: false
           ref: ${{ inputs.ref }}
-      - name: "Check whether the Java SDK exists at this ref"
+      - name: "Decide whether to build the Java SDK Javadoc"
         id: sdk-present
         env:
           REF: ${{ inputs.ref }}
+          INCLUDE_DOCS: ${{ inputs.include-docs }}
         run: |
-          if [[ -f "java-sdk/gradlew" ]]; then
+          # The Java SDK Javadoc is only built (and later published) for full 
doc
+          # builds (include-docs == 'all') or when 'java-sdk' is explicitly 
listed.
+          # When a specific list of packages is passed (e.g. a provider release
+          # wave like "amazon cncf.kubernetes ..."), the Java SDK must NOT be 
added
+          # automatically — otherwise the publish step drags java-sdk into a
+          # providers-only publish and the S3 publish fails.
+          if [[ "${INCLUDE_DOCS}" != "all" && " ${INCLUDE_DOCS} " != *" 
java-sdk "* ]]; then
+            echo "exists=false" >> "${GITHUB_OUTPUT}"
+            echo "include-docs='${INCLUDE_DOCS}' is a specific package list 
without 'java-sdk' — skipping Javadoc build."
+          elif [[ -f "java-sdk/gradlew" ]]; then
             echo "exists=true" >> "${GITHUB_OUTPUT}"
           else
             echo "exists=false" >> "${GITHUB_OUTPUT}"

Reply via email to