Skip to content

Conversation

@vladwa
Copy link

@vladwa vladwa commented Jan 25, 2025

The image tag 0.1.0-SNAPSHOT does not exist in the apache/spark-kubernetes-operator repository, causing the spark-kubernetes-operator to enter a CrashLoopBackOff state.

What changes were proposed in this pull request?

Pod was resulting in :
bash-3.2$ kubectl get pods
NAME READY STATUS RESTARTS AGE
spark-kubernetes-operator-778b9bbdc6-ft75q 0/1 CrashLoopBackOff 13 (4m40s ago) 38m

Why are the changes needed?

The changes are needed because the current image tag 0.1.0-SNAPSHOT doesn't exist in the apache/spark-kubernetes-operator repository. This missing image tag is causing the spark-kubernetes-operator to keep crashing and restarting, which prevents it from working properly. By updating the image tag to a valid version that actually exists, we can fix this issue and make sure the operator runs smoothly.

Does this PR introduce any user-facing change?

No

How was this patch tested?

This was tested by updating the image tag in the spark-kubernetes-operator deployment. After that pod went to running state.
bash-3.2$ kubectl get pods
NAME READY STATUS RESTARTS AGE
spark-kubernetes-operator-778b9bbdc6-ft75q 1/1 Running 0 (7m34s ago) 40m

Was this patch authored or co-authored using generative AI tooling?

No

Image tag = 0.1.0-SNAPSHOT dosent exist in the apache/spark-kubernetes-operator repo. Because of the spark-kubernetes-operator was in crashloopback off state.
@github-actions github-actions bot added the BUILD label Jan 25, 2025
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for making a PR, @vladwa .

However, the AS-IS values are correct for the local Gradle build environment, aren't they?

The proposed setting is only for nightly-published helm chart. And, we already handle them automatically when we publish the nightly helm chart here.

sed -i 's/repository: /repository: apache\//' spark-kubernetes-operator/values.yaml
sed -i 's/tag: .*$/tag: main-snapshot/' spark-kubernetes-operator/values.yaml

@vladwa
Copy link
Author

vladwa commented Jan 27, 2025

@dongjoon-hyun

However, the AS-IS values are correct for the local Gradle build environment, aren't they?
I am not sure, I am submitting this PR for the error I encountered while install operator by executing below command.
helm install spark-kubernetes-operator --create-namespace -f build-tools/helm/spark-kubernetes-operator/values.yaml build-tools/helm/spark-kubernetes-operator/

It seems that the commands at

sed -i 's/repository: /repository: apache\//' spark-kubernetes-operator/values.yaml
sed -i 's/tag: .*$/tag: main-snapshot/' spark-kubernetes-operator/values.yaml
were not executed, as I don't see the updates in https://github.com/apache/spark-kubernetes-operator/blob/main/build-tools/helm/spark-kubernetes-operator/values.yaml#L17-L19

@dongjoon-hyun
Copy link
Member

I am not sure, I am submitting this PR for the error I encountered while install operator by executing below command. helm install spark-kubernetes-operator --create-namespace -f build-tools/helm/spark-kubernetes-operator/values.yaml build-tools/helm/spark-kubernetes-operator/

Did you follow the full instructions in README.md? Probably, the first 3 commands for local testing are missed. Could you confirm that?

$ ./gradlew build -x test
$ ./gradlew buildDockerImage
$ ./gradlew spark-operator-api:relocateGeneratedCRD
$ helm install spark-kubernetes-operator --create-namespace -f build-tools/helm/spark-kubernetes-operator/values.yaml build-tools/helm/spark-kubernetes-operator/

It seems that the commands at

sed -i 's/repository: /repository: apache\//' spark-kubernetes-operator/values.yaml
sed -i 's/tag: .*$/tag: main-snapshot/' spark-kubernetes-operator/values.yaml

were not executed, as I don't see the updates in https://github.com/apache/spark-kubernetes-operator/blob/main/build-tools/helm/spark-kubernetes-operator/values.yaml#L17-L19

FYI, publish_snapshot_chart.yml is our GitHub Action script for nightly run in the following. It's irrelevant from a local testing.


image:
repository: spark-kubernetes-operator
repository: apache/spark-kubernetes-operator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, if you follow the full instructions, the following image exists in your local docker system like the following.

$ docker images
REPOSITORY                  TAG               IMAGE ID       CREATED         SIZE
spark-kubernetes-operator   0.1.0-SNAPSHOT    05633213ce49   5 seconds ago   573MB

@dongjoon-hyun
Copy link
Member

Let me close this since I verified it works correctly. We can continue the discussion and reopen this if you still have any issues. Anyway, thank you again, @vladwa .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants