From 1ca6021cd29164a1931b33cf47eed33b8ea35b5f Mon Sep 17 00:00:00 2001 From: Yi Chen Date: Wed, 9 Oct 2024 19:55:54 +0800 Subject: [PATCH] Add check for generating manifests and code Signed-off-by: Yi Chen --- .github/workflows/integration.yaml | 25 ++++++++++++++++--- ...tor.k8s.io_scheduledsparkapplications.yaml | 4 +-- ...parkoperator.k8s.io_sparkapplications.yaml | 4 +-- ...tor.k8s.io_scheduledsparkapplications.yaml | 4 +-- ...parkoperator.k8s.io_sparkapplications.yaml | 4 +-- 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index 7c3e7a956a..1b1e79b02d 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -38,6 +38,15 @@ jobs: false fi + - name: Generate code + run: | + make generate + if ! git diff --quiet; then + echo "Need to re-run 'make generate' and commit the changes." + git diff + false + fi + - name: Run go fmt check run: | make go-fmt @@ -145,6 +154,18 @@ jobs: - name: Set up chart-testing uses: helm/chart-testing-action@v2.6.1 + - name: Generate manifests + run: | + make manifests + if ! git diff --quiet; then + echo "Need to re-run 'make manifests' and commit the changes." + git diff + false + fi + + - name: Detect CRDs drift between chart and manifest + run: make detect-crds-drift + - name: Run chart-testing (list-changed) id: list-changed env: @@ -161,10 +182,6 @@ jobs: BRANCH: ${{ steps.get_branch.outputs.BRANCH }} run: ct lint --check-version-increment=false --target-branch $BRANCH - - name: Detect CRDs drift between chart and manifest - if: steps.list-changed.outputs.changed == 'true' - run: make detect-crds-drift - - name: Produce the helm documentation if: steps.list-changed.outputs.changed == 'true' run: | diff --git a/charts/spark-operator-chart/crds/sparkoperator.k8s.io_scheduledsparkapplications.yaml b/charts/spark-operator-chart/crds/sparkoperator.k8s.io_scheduledsparkapplications.yaml index f5318f0369..41a9f91ce0 100644 --- a/charts/spark-operator-chart/crds/sparkoperator.k8s.io_scheduledsparkapplications.yaml +++ b/charts/spark-operator-chart/crds/sparkoperator.k8s.io_scheduledsparkapplications.yaml @@ -9605,8 +9605,8 @@ spec: additionalProperties: type: string description: |- - HadoopConf carries user-specified Hadoop configuration properties as they would use the the "--conf" option - in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop + HadoopConf carries user-specified Hadoop configuration properties as they would use the "--conf" option + in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop configuration properties. type: object hadoopConfigMap: diff --git a/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml b/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml index c56effc2f6..0097efd190 100644 --- a/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml +++ b/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml @@ -9514,8 +9514,8 @@ spec: additionalProperties: type: string description: |- - HadoopConf carries user-specified Hadoop configuration properties as they would use the the "--conf" option - in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop + HadoopConf carries user-specified Hadoop configuration properties as they would use the "--conf" option + in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop configuration properties. type: object hadoopConfigMap: diff --git a/config/crd/bases/sparkoperator.k8s.io_scheduledsparkapplications.yaml b/config/crd/bases/sparkoperator.k8s.io_scheduledsparkapplications.yaml index f5318f0369..41a9f91ce0 100644 --- a/config/crd/bases/sparkoperator.k8s.io_scheduledsparkapplications.yaml +++ b/config/crd/bases/sparkoperator.k8s.io_scheduledsparkapplications.yaml @@ -9605,8 +9605,8 @@ spec: additionalProperties: type: string description: |- - HadoopConf carries user-specified Hadoop configuration properties as they would use the the "--conf" option - in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop + HadoopConf carries user-specified Hadoop configuration properties as they would use the "--conf" option + in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop configuration properties. type: object hadoopConfigMap: diff --git a/config/crd/bases/sparkoperator.k8s.io_sparkapplications.yaml b/config/crd/bases/sparkoperator.k8s.io_sparkapplications.yaml index c56effc2f6..0097efd190 100644 --- a/config/crd/bases/sparkoperator.k8s.io_sparkapplications.yaml +++ b/config/crd/bases/sparkoperator.k8s.io_sparkapplications.yaml @@ -9514,8 +9514,8 @@ spec: additionalProperties: type: string description: |- - HadoopConf carries user-specified Hadoop configuration properties as they would use the the "--conf" option - in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop + HadoopConf carries user-specified Hadoop configuration properties as they would use the "--conf" option + in spark-submit. The SparkApplication controller automatically adds prefix "spark.hadoop." to Hadoop configuration properties. type: object hadoopConfigMap: