pulumi-datadog
pulumi-datadog copied to clipboard
Golang SDK hang indefinitely
What happened?
I'm using the golang sdk and when running preview it just hangs forever. This only applies to resources from the Datadog package itself and not when using the aws
package.
Example
Here's sample go code that when run just hangs forever:
func datadogErrorLogMonitor(ctx *pulumi.Context, serviceName string) error {
// Create the Datadog monitor
name := fmt.Sprintf("%sErrorLog", serviceName)
_, err := datadog.NewMonitor(ctx, name, &datadog.MonitorArgs{
Name: pulumi.Sprintf("%sErrorLog", serviceName),
Type: pulumi.String("log alert"),
Query: pulumi.String("logs(\"status:error service:my-service\").index(\"*\").rollup(\"count\").last(\"5m\") > 1"),
Message: pulumi.String("@slack-datadog-monitor \n\nError was logged in {{log.service}} with error: {{log.attributes.error}}"),
Tags: pulumi.StringArray{},
EnableLogsSample: pulumi.Bool(true),
NotifyAudit: pulumi.Bool(false),
OnMissingData: pulumi.String("default"),
IncludeTags: pulumi.Bool(false),
MonitorThresholds: datadog.MonitorMonitorThresholdsArgs{
Critical: pulumi.String("1"),
CriticalRecovery: pulumi.String("0"),
},
NotificationPresetName: pulumi.String("hide_handles"),
})
if err != nil {
return err
}
return nil
}
Output
pulumi preview -C pulumi_v1 -s prod_v1 --diff
Previewing update (prod_v1)
View Live: https://app.pulumi.com/my-org/my-repo/my-stack/previews/my-id
error: preview canceled
I end up cancelling the preview because minutes and minutes go by with nothing (a regular preview takes under 15 seconds to complete)
Output of pulumi about
CLI
Version 3.114.0
Go Version go1.22.2
Go Compiler gc
Plugins
KIND NAME VERSION
resource aws 6.32.0
resource awsx 2.10.0
resource datadog 4.28.0
resource docker 4.4.3
language go unknown
Host
OS darwin
Version 14.4.1
Arch arm64
This project is written in go: executable='/opt/homebrew/bin/go' version='go version go1.22.1 darwin/arm64'
Backend
Name pulumi.com
URL https://app.pulumi.com/my-name
User my-name
Organizations my-org, my-org-1, my-org-2
Token type personal
Dependencies:
NAME VERSION
github.com/pulumi/pulumi-aws/sdk/v6 v6.32.0
github.com/pulumi/pulumi-awsx/sdk/v2 v2.10.0
github.com/pulumi/pulumi-datadog/sdk/v4 v4.28.0
github.com/pulumi/pulumi/sdk/v3 v3.113.0
Pulumi locates its logs in /var/folders/4x/l0nfshs500z95ztqxp4zjhcc0000gn/T/ by default
warning: Failed to get information about the current stack: No current stack
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).