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

Fix buggy behavior with annotations/labels on preview #461

Merged
merged 1 commit into from
Mar 1, 2019

Conversation

lblackstone
Copy link
Member

The unstructured GetLabels and GetAnnotations methods expect
that all of the annotations have string values, and error silently
if this is not the case. During previews that included computed
values in either the labels or annotations, the provider was
erroneously clearing these fields due to this error. This fix
manually updates those fields to avoid resetting them.

Fixes #438

The unstructured GetLabels and GetAnnotations methods expect
that all of the annotations have string values, and error silently
if this is not the case. During previews that included computed
values in either the labels or annotations, the provider was
erroneously clearing these fields due to this error. This fix
manually updates those fields to avoid resetting them.
@hausdorff
Copy link
Contributor

I'm having trouble understanding upstream thinks this is acceptable. Can we bring this up in the appropriate upstream repositories?

Copy link
Contributor

@hausdorff hausdorff left a comment

Choose a reason for hiding this comment

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

Is there a way to do some sort of Go linting to fail the build if we use either of these functions? From my perspective, this is a major issue with upstream and it would be nice to make sure we don't use these APIs until they're fixed.

@lblackstone
Copy link
Member Author

I don't see an obvious way to do that, but I'll keep an eye out for further problematic usage while I'm refactoring. This should only happen on preview since all the other stages will be using populated values and not promises.

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.

Computed annotations are not showing up correctly in preview for autonamed resources
2 participants