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

resource: use Patch in APIFinalizer #550

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sttts
Copy link
Contributor

@sttts sttts commented Sep 18, 2023

Description of your changes

Calling Update on a non-unstructured object will potentially lead to data-loss because it is not guaranteed that the object is a complete representation of all the fields stored in the apiserver, e.g. because of version skew between client and Crossplane.

I have:

  • is that type cast safe?
  • do we have enough test coverage to confirm the safety of this change?
  • maybe run proof PR in crossplane
  • Read and followed Crossplane's contribution process.
  • Run make reviewable test to ensure this PR is ready for review.

How has this code been tested

Via Crossplane test suite, aka unit tests and e2e tests.

@sttts sttts requested review from a team as code owners September 18, 2023 19:30
@sttts sttts requested review from phisco and MisterMX September 18, 2023 19:30
Signed-off-by: Dr. Stefan Schimanski <[email protected]>
@sttts sttts force-pushed the sttts-apifinalizer-patch branch from 6fe554e to 4af9c39 Compare September 18, 2023 19:34
@sttts
Copy link
Contributor Author

sttts commented Sep 18, 2023

Actually, this can lose changes that were made before calling the finalizer code, i.e. there is no way around comparing to a fresh object :-/

@sttts sttts marked this pull request as draft September 18, 2023 20:47
Copy link

github-actions bot commented Sep 3, 2024

Crossplane does not currently have enough maintainers to address every issue and pull request. This pull request has been automatically marked as stale because it has had no activity in the last 90 days. It will be closed in 14 days if no further activity occurs. Adding a comment starting with /fresh will mark this PR as not stale.

@github-actions github-actions bot added stale and removed stale labels Sep 3, 2024
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.

1 participant