crossplane-contrib / crossplane-provider-newrelic

Apache License 2.0
0 stars 3 forks source link

AlertCondition fails to reconcile after the controller pod restarts #22

Closed jacob-hudson closed 3 months ago

jacob-hudson commented 3 months ago

What happened?

AlertCondition resources fail to reconcile after the controller pod restarts

How can we reproduce it?

What environment did it happen in?

Crossplane version: 1.15.2 Kubernetes Version: AWS EKS 1.27

jacob-hudson commented 3 months ago

When you are rebuilding the state, you have policyId:conditioned:conditionType

instead of "id":"1327951:6879335:static"

it should be "id":"1327951:6879335"

On new alert creation, there is no issue

jacob-hudson commented 3 months ago

This works as expected

terraform import newrelic_nrql_alert_condition.complete-example 1327951:6879335:static

Meaning the State files are being corrupted somehow as the resource are being imported correctly

jacob-hudson commented 3 months ago

@smcavallo Could you please take a look at this issue/PR when you get a chance? This is preventing us from replacing the original NewRelic Provider you wrote as we have codified Alert Conditions that need to be managed

If I am completely off on the PR, let me know - this was found when investigating/testing the provider preparing it to go to production

smcavallo commented 3 months ago

@jacob-hudson thank you so much for this - I will take a look and review

smcavallo commented 3 months ago

@jacob-hudson your fix has been merged and published to the upbound marketplace. Thanks again for the fix (and using this provider!!!)
https://marketplace.upbound.io/providers/crossplane-contrib/crossplane-provider-newrelic/v0.2.1