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

Handle string values in the equalNumbers function #691

Merged
merged 3 commits into from
Aug 5, 2019

Conversation

lblackstone
Copy link
Member

The equalNumbers function wasn't expecting string inputs,
and would panic if one was present. This condition is
possible if one of the values is unknown during preview.

The equalNumbers function wasn't expecting string inputs,
and would panic if one was present. This condition is
possible if one of the values is unknown during preview.
@lblackstone
Copy link
Member Author

@hausdorff @pgavlin I wasn't able to reproduce the original issue, but this change should prevent the panic that was reported:

pulumi:pulumi:Stack (codefresh-support):
    panic: interface conversion: interface {} is string, not int64
    goroutine 217 [running]:
    github.com/pulumi/pulumi-kubernetes/pkg/provider.equalNumbers(0x2066c40, 0xc00174a750, 0x2042080, 0x32868c1, 0xc0014f4000)

pkg/provider/provider.go Outdated Show resolved Hide resolved
Copy link
Member

@pgavlin pgavlin left a comment

Choose a reason for hiding this comment

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

One nit, LGTM otherwise.

pkg/provider/provider.go Outdated Show resolved Hide resolved
Co-Authored-By: Pat Gavlin <pat@pulumi.com>
@lblackstone lblackstone merged commit a33c437 into master Aug 5, 2019
@pulumi-bot pulumi-bot deleted the lblackstone/equal-number-fix branch August 5, 2019 23:15
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.

None yet

3 participants