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-43356][K8S] Migrate deprecated createOrReplace to serverSideApply #41136

Closed
wants to merge 1 commit into from

Conversation

pan3793
Copy link
Member

@pan3793 pan3793 commented May 11, 2023

What changes were proposed in this pull request?

The deprecation message of createOrReplace indicates that we should change createOrReplace to serverSideApply instead.

@deprecated please use {@link ServerSideApplicable#serverSideApply()} or attempt a create and edit/patch operation.

The change is not fully equivalent, but I believe it's reasonable.

With the caveat that the user may choose not to use forcing if they want to know when there are conflicting changes.

Also unlike createOrReplace if the resourceVersion is set on the resource and a replace is attempted, it will be optimistically locked.

See more details at fabric8io/kubernetes-client#5073

Why are the changes needed?

Remove usage of deprecated API.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Pass GA.

@pan3793
Copy link
Member Author

pan3793 commented May 11, 2023

cc @dongjoon-hyun @Yikun

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.

How many PRs do you want to make, @pan3793 ? Actually, we don't need to follow deprecation eagerly if there is no planned deletion.

@pan3793
Copy link
Member Author

pan3793 commented May 11, 2023

How many PRs do you want to make

No overall estimation, I have been working on this area recently, and would like to propose change when I find something has room for improvement.

@dongjoon-hyun
Copy link
Member

Then, let's hold on this PR for a while because we don't need to take any risk.

@pan3793 pan3793 marked this pull request as draft May 11, 2023 11:01
@pan3793 pan3793 marked this pull request as ready for review May 12, 2023 02:09
@dongjoon-hyun
Copy link
Member

We are now using 6.7.0. Could you rebase it to the master branch?

@pan3793
Copy link
Member Author

pan3793 commented Jun 5, 2023

rebased on the latest master branch

@holdenk
Copy link
Contributor

holdenk commented Jun 6, 2023

Looks reasonable to me pending @dongjoon-hyun's review

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.

+1, LGTM, too.

@dongjoon-hyun
Copy link
Member

Merged to master.
Thank you, @pan3793 and @holdenk .

czxm pushed a commit to czxm/spark that referenced this pull request Jun 12, 2023
### What changes were proposed in this pull request?

The deprecation message of `createOrReplace` indicates that we should change `createOrReplace` to `serverSideApply` instead.

```
deprecated please use {link ServerSideApplicable#serverSideApply()} or attempt a create and edit/patch operation.
```

The change is not fully equivalent, but I believe it's reasonable.

> With the caveat that the user may choose not to use forcing if they want to know when there are conflicting changes.
>
> Also unlike createOrReplace if the resourceVersion is set on the resource and a replace is attempted, it will be optimistically locked.

See more details at fabric8io/kubernetes-client#5073

### Why are the changes needed?

Remove usage of deprecated API.

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Pass GA.

Closes apache#41136 from pan3793/SPARK-43356.

Authored-by: Cheng Pan <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants