You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When provisioning multiple resources of type sentry_integration_pagerduty the terraform plan will fail with an error. Usual after the first resource has succeeded. The error is:
Service table item not found: ####
eg.
Looking at the code here it seems the sentry API is behaving as eventually consistent, instead of transactional because the code it does the following:
Calls GET to the list the organization available integration for PD
Calls Update to update the organization available integration for PD
Calls GET to confirm that the update was successful. <- This throws the errors after inspecting the results
I should mention this only happens when there are multiple "sentry_integration_pagerduty" resources to provision. The first one succeeds and the following ones all fail.
When this happens the terraform state is left in a bad state and "terraform state rm" needs to be run to remove the last "sentry_integration_pagerduty" resource that didn't succeed.
It should fail gracefully without resulting in a bad statefile.
In the event the downstream api can not be changed. A retry or wait might help it not fail at all.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. It may be due to the endpoint only accepting a list of service table items, leading to a race condition when run concurrently. For example, the first process edits a table item while the second process also edits a table item. A fix is to ensure that the resource can run only once concurrently against the same integration.
When provisioning multiple resources of type
sentry_integration_pagerduty
the terraform plan will fail with an error. Usual after the first resource has succeeded. The error is:eg.
Looking at the code here it seems the sentry API is behaving as eventually consistent, instead of transactional because the code it does the following:
I should mention this only happens when there are multiple "sentry_integration_pagerduty" resources to provision. The first one succeeds and the following ones all fail.
When this happens the terraform state is left in a bad state and "terraform state rm" needs to be run to remove the last "sentry_integration_pagerduty" resource that didn't succeed.
It should fail gracefully without resulting in a bad statefile.
In the event the downstream api can not be changed. A retry or wait might help it not fail at all.
The text was updated successfully, but these errors were encountered: