-
-
Notifications
You must be signed in to change notification settings - Fork 149
Description
Description
We are currently unable to use this Terraform provider for any Sentry API operations (get, list, create, update, delete) due
to an upstream bug in the go-sentry SDK dependency.
Root Cause
The issue originates from jianyuan/go-sentry#100, where the MetricAlertTriggerAction struct has an
incorrect field type for SentryAppID:
- Current (incorrect): SentryAppID *string
- Expected: SentryAppID *int (nullable pointer to integer)
Impact
Even though this Terraform provider may not explicitly use the SentryAppID field, the MetricAlertTriggerAction struct is
unmarshalled during every API call to Sentry. When the API returns null or an integer value for this field, the unmarshalling
process fails because the Go SDK expects a string but receives an integer value.
This effectively breaks:
- All data sources (unable to read/list resources)
- All resource CRUD operations (create, read, update, delete)
- Any operation that interacts with Sentry's API
Error Example
Error: json: cannot unmarshal number into Go struct field MetricAlertTriggerAction.sentryAppId of type string
Proposed Solution
The fix is already available in jianyuan/go-sentry#101, which changes the field type from *string to
*int (a one-line change).
Action Required
- Merge the upstream PR: fix: change SentryAppID type from string to int go-sentry#101
- Release a new version of go-sentry (e.g., v2.8.5)
- Update this provider's dependency to use the fixed version
Environment
- Terraform Provider Version: v0.14.3 (also affects latest version in main branch)
- go-sentry Version: v2.8.4
- Affected API Calls: All operations