From a1aa07fc5447709f084fb0efd572a51ff4144985 Mon Sep 17 00:00:00 2001 From: m1a2st Date: Sat, 14 Dec 2024 17:15:44 +0800 Subject: [PATCH 1/6] draft a version --- .github/workflows/build.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e860073ecdd5c..e0141541af1c2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,6 +118,17 @@ jobs: # --no-scan: For public fork PRs, we won't attempt to publish the scan run: | ./gradlew --build-cache --info $SCAN_ARG check -x test + - name: Check generated documentation + # Check if there are any empty files under ./site-docs/generated, If any empty files are found, print an error + # message and list the empty files + run: | + ./gradlew clean siteDocTar + tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz + if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then + echo "One or more documentation files are empty!" >&2 + find ./site-docs/generated -type f -exec grep -L "." {} \; >&2 + exit 1 + fi - name: Archive check reports if: always() uses: actions/upload-artifact@v4 From aa279b58350b9398d7851a6ec60ad6ee6d7354c6 Mon Sep 17 00:00:00 2001 From: m1a2st Date: Sun, 15 Dec 2024 15:48:14 +0800 Subject: [PATCH 2/6] merge run into Compile and validate --- .github/workflows/build.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e0141541af1c2..ad465f2a8c07d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,11 +118,7 @@ jobs: # --no-scan: For public fork PRs, we won't attempt to publish the scan run: | ./gradlew --build-cache --info $SCAN_ARG check -x test - - name: Check generated documentation - # Check if there are any empty files under ./site-docs/generated, If any empty files are found, print an error - # message and list the empty files - run: | - ./gradlew clean siteDocTar + ./gradlew siteDocTar tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then echo "One or more documentation files are empty!" >&2 From 356e8a33ce15f11182db24329c880ef7842b1b7b Mon Sep 17 00:00:00 2001 From: m1a2st Date: Sun, 15 Dec 2024 17:58:55 +0800 Subject: [PATCH 3/6] Draft a version --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad465f2a8c07d..f7965c0c22b13 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -117,8 +117,8 @@ jobs: # --scan: Publish the build scan. This will only work on PRs from apache/kafka and trunk # --no-scan: For public fork PRs, we won't attempt to publish the scan run: | - ./gradlew --build-cache --info $SCAN_ARG check -x test ./gradlew siteDocTar + ./gradlew --build-cache --info $SCAN_ARG check -x test tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then echo "One or more documentation files are empty!" >&2 From 976d94a99a6003fbb60d5d77cc89413a78b7b2cc Mon Sep 17 00:00:00 2001 From: m1a2st Date: Sun, 15 Dec 2024 18:43:35 +0800 Subject: [PATCH 4/6] revert --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f7965c0c22b13..ad465f2a8c07d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -117,8 +117,8 @@ jobs: # --scan: Publish the build scan. This will only work on PRs from apache/kafka and trunk # --no-scan: For public fork PRs, we won't attempt to publish the scan run: | - ./gradlew siteDocTar ./gradlew --build-cache --info $SCAN_ARG check -x test + ./gradlew siteDocTar tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then echo "One or more documentation files are empty!" >&2 From 79b2a9d46e4bbdadd42a50062ac128fbe94ab5d9 Mon Sep 17 00:00:00 2001 From: m1a2st Date: Wed, 18 Dec 2024 23:06:45 +0800 Subject: [PATCH 5/6] addressed by comments --- .github/workflows/build.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ad465f2a8c07d..f0bb7b4d18946 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -117,14 +117,7 @@ jobs: # --scan: Publish the build scan. This will only work on PRs from apache/kafka and trunk # --no-scan: For public fork PRs, we won't attempt to publish the scan run: | - ./gradlew --build-cache --info $SCAN_ARG check -x test - ./gradlew siteDocTar - tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz - if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then - echo "One or more documentation files are empty!" >&2 - find ./site-docs/generated -type f -exec grep -L "." {} \; >&2 - exit 1 - fi + ./gradlew --build-cache --info $SCAN_ARG check siteDocTar -x test - name: Archive check reports if: always() uses: actions/upload-artifact@v4 @@ -144,6 +137,17 @@ jobs: run: python .github/scripts/rat.py env: GITHUB_WORKSPACE: ${{ github.workspace }} + - name: Check generated documentation + if: always() + # Check if there are any empty files under ./site-docs/generated, If any empty files are found, print an error + # message and list the empty files + run: | + tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz + if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then + echo "One or more documentation files are empty!" >&2 + find ./site-docs/generated -type f -exec grep -L "." {} \; >&2 + exit 1 + fi test: needs: [validate, load-catalog] From ebcb2465a70ffcb147d47616cdf406530db4e888 Mon Sep 17 00:00:00 2001 From: m1a2st Date: Thu, 19 Dec 2024 01:01:10 +0800 Subject: [PATCH 6/6] addressed by comments --- .github/workflows/build.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0bb7b4d18946..504782ddbe638 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -138,15 +138,14 @@ jobs: env: GITHUB_WORKSPACE: ${{ github.workspace }} - name: Check generated documentation - if: always() # Check if there are any empty files under ./site-docs/generated, If any empty files are found, print an error # message and list the empty files run: | tar zxvf core/build/distributions/kafka_2.13-$(./gradlew properties | grep version: | awk '{print $NF}' | head -n 1)-site-docs.tgz if find ./site-docs/generated -type f -exec grep -L "." {} \; | grep -q "."; then - echo "One or more documentation files are empty!" >&2 - find ./site-docs/generated -type f -exec grep -L "." {} \; >&2 - exit 1 + echo "One or more documentation files are empty!" >&2 + find ./site-docs/generated -type f -exec grep -L "." {} \; >&2 + exit 1 fi test: