-
Notifications
You must be signed in to change notification settings - Fork 13
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
Address inconsistent _lazy_values
after attribute set
#45
Address inconsistent _lazy_values
after attribute set
#45
Conversation
a787ebb
to
8f466d0
Compare
f254cde
to
c683d92
Compare
_lazy_values
after attribute set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @addyess, thanks for reporting the issue and prepare a fix for it.
Your change looks good but please take a look at my comment regarding the breaking change of .log() method.
Cool, I've backed out the changes to the tests regarding |
Change is good now. Let's wait for the other fix to get merged first so that we keep master stable. |
Can you rebase? |
…inconsistent_lazy_values
Done. thanks for the reviews |
I still get the warning "This branch cannot be rebased due to conflicts" |
I rebased manually in #47. There was a conflict on the logging testing lines. Please take a look. Only difference is that I kept both previous and new tests for logging, so we cover both options. |
Reason for this change
After loading any Kubernetes Object
from_dict
, some of it's attributes may be loaded lazily -- meaning they aren't converted to their lightkube object type until referenced, and remain attached to the object in the_lazy_values
attribute until read.If you change one of these attributes via an attribute set, the
_lazy_value
attribute should be invalidated otherwise ato_dict
will use the lazy_value view rather than the lightkube native viewAdding unit tests that shows #44 fails in master branch
Depends on changes below for unit-tests to function