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

[sc-118429] Don't convert empty monitor conditions back to API model #95

Closed
wants to merge 3 commits into from

Conversation

aschepis
Copy link
Collaborator

Our Pulumi provider is built using Pulumi's Terraform
bridge library. We ran into a bug specific to Pulumi where
updating the conditions of a monitor after it had been
created caused validation to fail before we even got
calling the API. The issue was trivially reproducible
in Pulumi, but non-reproducible with the same
configuration in Terraform. Upon debugging I found
that the code that converts monitor condition state
representation to the API model format was getting
an empty condition. This shouldn't happen if the
monitor was successfully applied in the past and
stored to state.

The fix I made was to ignore condition args that
are fully empty (no op, no value, no severity, etc)

I believe that this is a result of the
difference in how Terraform and Pulumi persist state.

sc-118429

Our Pulumi provider is built using Pulumi's Terraform
bridge library. We ran into a bug specific to Pulumi where
updating the conditions of a monitor after it had been
created caused validation to fail before we even got
calling the API. The issue was trivially reproducible
in Pulumi, but non-reproducible with the same
configuration in Terraform. Upon debugging I found
that the code that converts monitor condition state
representation to the API model format was getting
an empty condition. This shouldn't happen if the
monitor was successfully applied in the past and
stored to state.

The fix I made was to ignore condition args that
are fully empty (no op, no value, no severity, etc)

I believe that this is a result of the
difference in how Terraform and Pulumi persist state.

sc-118429
@aschepis aschepis requested a review from a team as a code owner December 16, 2024 19:20
@aschepis
Copy link
Collaborator Author

aschepis commented Dec 16, 2024

This change is part of the following stack:

Change managed by git-spice.

@aschepis
Copy link
Collaborator Author

was not specific to provider. was actually a terraform plugin sdk issue. had to use our fork in pulumi provider

@aschepis aschepis closed this Dec 16, 2024
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.

1 participant