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

Fix inconsistent spark driver and executor image #3996

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chi-yelp
Copy link
Contributor

@chi-yelp chi-yelp commented Dec 17, 2024

Description

The Spark driver and executor image version can be inconsistent in a Tron action run when a job is already scheduled before the image is updated, which causes an InvalidClassException if the image's Spark version was changed.

Behavior:

  • The action was run with old spark.kubernetes.container.image
  • The image is different with the version in the latest Config command
  • In the Tron web's META section, the PAASTA_DOCKER_IMAGE used is the latest version in the Config command

Solution

Set spark.kubernetes.container.image to $PAASTA_DOCKER_IMAGE when generating the spark-submit command, to read the environment variable set by Tron, which is the image that Spark driver uses.

Test

Checking the environment variable we are referencing for Tron in this PR

$ paasta spark-run --aws-profile=dev --cmd '/bin/env | grep PAASTA_DOCKER_IMAGE'
...
PAASTA_DOCKER_IMAGE=services-spark:paasta-<iamge_tag>

and spark.kubernetes.container.image should be something like: docker-paasta.yelpcorp.com:443/services-spark:<iamge_tag>

Release Plan

Pin the paasta version everywhere except pnw-devc, to test in devc first.

@chi-yelp chi-yelp requested a review from nemacysts January 7, 2025 14:10
@chi-yelp chi-yelp marked this pull request as ready for review January 7, 2025 14:10
@chi-yelp chi-yelp requested a review from a team as a code owner January 7, 2025 14:10
paasta_tools/tron_tools.py Outdated Show resolved Hide resolved
@chi-yelp chi-yelp requested a review from nemacysts January 9, 2025 11:27
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