Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes an issue with github action in job build-spark-operator #1452

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

aneagoe
Copy link
Contributor

@aneagoe aneagoe commented Jan 13, 2022

It seems that https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/pull/1418/files introduces a bug in the workflow, at step Check changes in resources used in docker file in job build-spark-operator:

      - name: Check changes in resources used in docker file
        run: |
          DOCKERFILE_RESOURCES=$(cat Dockerfile | grep -P -o "COPY [a-zA-Z0-9].*? " | cut -c6-)
          for resource in $DOCKERFILE_RESOURCES; do
            # If the resource is different
            if ! git diff  --quiet origin/master -- $resource; then
              ## And the appVersion hasn't been updated
              if ! git diff --quiet charts/spark-operator-chart/Chart.yaml | grep +appVersion; then
                echo "resource used in gcr.io/spark-operator/spark-operator has changed in $resource, need to update the appVersion in charts/spark-operator-chart/Chart.yaml"
                git diff origin/master -- $resource;
                echo "failing the build... " && false
              fi
            fi
          done

Basically, git diff --quiet charts/spark-operator-chart/Chart.yaml | grep +appVersion would always fail since --quiet removes all output and can't be used together with grep. As a consequence, the required changes to Chart.yaml are never detected and builds would fail.

@liyinan926 liyinan926 merged commit 4efaecf into kubeflow:master Jan 13, 2022
jbhalodia-slack pushed a commit to jbhalodia-slack/spark-operator that referenced this pull request Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants