-
Notifications
You must be signed in to change notification settings - Fork 116
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
Fix namespace handling regression #403
Conversation
f236702
to
5138a01
Compare
…ources that could conflict with the dynamic client for that resource. All of the namespace handling has now been deferred to the client package rather than the provider.
5138a01
to
d2000fb
Compare
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.
I forget why this was part of the refactoring at all. What was the logic here?
@hausdorff I added that at some point deep in the middle of trying to get things working again. Now that the client package is cleaned up, the extra logic in the provider was redundant/not quite right. |
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.
Ok, so:
- This code is subtle but does seem to replace objects when
"default"
->""
namespace. - I actually forget (and can't figure out) why
diff.go
correctly does not register""
->"default"
namespace does not report replacement, as our tests clearly show it does.
Overall I'm kind of scared of the Diff
code.
@hausdorff I fixed the regression and expanded the new test to include both the cases you mentioned. |
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.
Ok, this looks fine to me. I think the tests should catch any more regressions... I think we should make sure that we're doing all we can here, we don't want to have another regression like this. :)
Due to recent refactoring, the provider was setting namespaces on resources
that could conflict with the dynamic client for that resource. All of the namespace
handling has now been deferred to the client package rather than the provider.
Fixes #400