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

fixed to update podgroup resource #3439

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

Conversation

calvin0327
Copy link
Contributor

fixed: #3104

Because of resource version, It's easy to fail to update podgroup. we should obtain the latest resource version before updating.

@volcano-sh-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign thor-wl
You can assign the PR to them by writing /assign @thor-wl in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@volcano-sh-bot volcano-sh-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Apr 25, 2024
@calvin0327
Copy link
Contributor Author

/auto-cc

Copy link
Member

@hwdef hwdef left a comment

Choose a reason for hiding this comment

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

I think the right way is to get the latest podgroup when the update fails

@calvin0327
Copy link
Contributor Author

@hwdef @googs1025 I agrees with you, it can reduce one request in most cases.

@volcano-sh-bot volcano-sh-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Apr 25, 2024
Signed-off-by: calvin <wen.chen@daocloud.io>
@calvin0327
Copy link
Contributor Author

@lowang-bh @hwdef PTAL

@hwdef
Copy link
Member

hwdef commented Apr 28, 2024

Is it useful to update only ResourceVersion? Should the entire resource be updated?

In addition, I think the naming of variables is ambiguous. The new resources obtained should not be older. Maybe newest is better.

@calvin0327
Copy link
Contributor Author

calvin0327 commented Apr 29, 2024

Is it useful to update only ResourceVersion? Should the entire resource be updated?

In addition, I think the naming of variables is ambiguous. The new resources obtained should not be older. Maybe newest is better.

@hwdef thanks for you review.
Because of a version conflict, only the resource version needs to be updated.
older is named relative to the resource that is currently being updated. newest is a adective, it doesn't seem very accurate。

@Monokaix
Copy link
Member

Monokaix commented May 8, 2024

UpdatePodGroup will be called when every session closed, I think it will be retryed when there is a conflict when every session closed: )

@Monokaix
Copy link
Member

Monokaix commented May 8, 2024

Also just modify the resourceversion instead of the field is ok?

@hwdef
Copy link
Member

hwdef commented May 8, 2024

resourceVersion and resource are bound, when you get a new resource and give its resourceVersion to the old one, this operation is very strange. For example, if the resource you recently got has been modified, some fields of it are different from the old resource, but you gave its resourceversion to the old resource. Then the updated fields are lost.

@Monokaix
Copy link
Member

Monokaix commented May 8, 2024

resourceVersion and resource are bound, when you get a new resource and give its resourceVersion to the old one, this operation is very strange. For example, if the resource you recently got has been modified, some fields of it are different from the old resource, but you gave its resourceversion to the old resource. Then the updated fields are lost.

Yeah, this is unacceptable: )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scheduler update job failed
6 participants