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

[SPARK-48722][K8S] Patch executor pod without optimistic locking #47102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dcoliversun
Copy link
Contributor

@dcoliversun dcoliversun commented Jun 26, 2024

What changes were proposed in this pull request?

This PR aims to support apache spark patch executor pod without optimistic locking when using version 6.5 or later of fabric8 kubernetes-client, to avoid error 409 conflicts when other components attempts to patch requests to the same executor pod.

Why are the changes needed?

Before fabric8 kubernetes-client#6.5, edit action without optimistic locking by default. Request is following:

{
    "requestObject":[
        {
            "op":"add",
            "path":"/metadata/labels",
            "value":{
                "spark-exec-inactive": "true"
            }
        }
    ]
}

After fabric8 kubernetes-client#6.5, edit action with optimistic locking. Request is following:

{
    "requestObject":[
        {
            "op":"add",
            "path":"/metadata/labels",
            "value":{
                "spark-exec-inactive":"true"
            }
        },
        {
            "op":"add",
            "path":"/metadata/resourceVersion",
            "value":"xxxx"
        }
    ]
}

More info: fabric8io/kubernetes-client#4896

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manual test with k8s auditing log.

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

No.

@dcoliversun dcoliversun marked this pull request as draft June 26, 2024 11:03
@dcoliversun dcoliversun changed the title [WIP][SPARK-48722][K8S] Patch executor pod without optimistic locking [SPARK-48722][K8S] Patch executor pod without optimistic locking Jun 27, 2024
@dcoliversun dcoliversun marked this pull request as ready for review June 27, 2024 01:31
@dcoliversun
Copy link
Contributor Author

cc @dongjoon-hyun Could you please review this PR if you have time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant