Skip to content

Conversation

@khanhtc1202
Copy link
Member

@khanhtc1202 khanhtc1202 commented Jun 7, 2022

What this PR does / why we need it:

Screen Shot 2022-06-07 at 17 35 48

The root cause of this issue is that we use the ApplicationKind (an enum) as the cloud provider type in the application configuration. Before submitting the piped configuration to the control plane, we do unmarshal/marshal the piped configuration, an enum value is cast to int32 and when we need to cast it back, it turns out not working (the below image shows the error in detail - thx @Szarny )

image

To resolve that, this PR added a new type CloudProviderType (define it equal to string) and use that in all places refer to pipedCfg.cloudProvider.

Which issue(s) this PR fixes:

Fixes #3731

Does this PR introduce a user-facing change?:

NONE

@khanhtc1202 khanhtc1202 enabled auto-merge (squash) June 7, 2022 10:48
Copy link
Member

@nghialv nghialv left a comment

Choose a reason for hiding this comment

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

Nice idea! 👍

Copy link
Member

@knanao knanao left a comment

Choose a reason for hiding this comment

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

Nice catch!

@khanhtc1202 khanhtc1202 merged commit b5edfd2 into master Jun 8, 2022
@khanhtc1202 khanhtc1202 deleted the fix-encode-piped-config branch June 8, 2022 01:41
@github-actions github-actions bot mentioned this pull request Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Display wrong cloud provider in Show Piped config dialog

4 participants