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

[Bug] Revisit shallow copy of struct #716

Closed
2 tasks done
kevin85421 opened this issue Nov 13, 2022 · 0 comments
Closed
2 tasks done

[Bug] Revisit shallow copy of struct #716

kevin85421 opened this issue Nov 13, 2022 · 0 comments
Assignees
Labels
bug Something isn't working operator P1 Issue that should be fixed within a few weeks stability Pertains to basic infrastructure stability

Comments

@kevin85421
Copy link
Member

Search before asking

  • I searched the issues and found no similar issues.

KubeRay Component

ray-operator

What happened + What you expected to happen

We need to revisit all shallow copy of struct in KubeRay because the following reasons:

(1) Shallow copy of a go struct is not encouraged, and see article for more details.

(2) Take #714 as an example, shallow copy of struct causes worker pods may be created with different configurations.

(3) "shallow copy of struct" I mentioned in (2) is not totally accurate. A struct is by default deep copied, but elements in the struct may be shallow copied or deep copied. See Shallow copy and Deep copy in Go for more details.

Reproduction script

See #714

Anything else

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!
@kevin85421 kevin85421 added the bug Something isn't working label Nov 13, 2022
@kevin85421 kevin85421 self-assigned this Nov 13, 2022
@DmitriGekhtman DmitriGekhtman added P1 Issue that should be fixed within a few weeks operator stability Pertains to basic infrastructure stability labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working operator P1 Issue that should be fixed within a few weeks stability Pertains to basic infrastructure stability
Projects
None yet
Development

No branches or pull requests

2 participants