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

Do not set object.raw on delete #471

Merged
merged 2 commits into from
Aug 27, 2024
Merged

Conversation

jumpojoy
Copy link
Contributor

Keep original object as is during delete to let calling other functions like create or exists.

fixes #470

Keep original object as is during delete to let calling other
functions like create or exists.

fixes kr8s-org#470
@github-actions github-actions bot added the kr8s label Aug 11, 2024
Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

This seems fine to me. Could I ask you to add a small test that verifies that the object hasn't been reset. This would help avoid this being reintroduced by accicent again in the future.

Copy link

codecov bot commented Aug 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.09%. Comparing base (87063fc) to head (1e2f243).
Report is 111 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #471      +/-   ##
==========================================
+ Coverage   94.61%   95.09%   +0.47%     
==========================================
  Files          29       30       +1     
  Lines        3141     3896     +755     
==========================================
+ Hits         2972     3705     +733     
- Misses        169      191      +22     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Make sure object is not changed and we still can
call exists() method on it after delete

fixes kr8s-org#470
@github-actions github-actions bot added the tests label Aug 24, 2024
Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

Awesome many thanks!

@jacobtomlinson jacobtomlinson merged commit ff5fad5 into kr8s-org:main Aug 27, 2024
11 checks passed
@jacobtomlinson jacobtomlinson added the bug Something isn't working label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kr8s tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When delete() is called on object its fields are reset
2 participants