Skip to content

Very slow resource refreshing when not found #421

@dbaggott

Description

@dbaggott

I'm using this provider to manage rollbar notifications and it's taking an extremely long time to refresh notifications as can be seen from the timestamps in this output from the planning phase:

module.rollbar.module.main_qa_notifications.module.content-service_notifications.rollbar_notification.slack["new_item"]: Refreshing state... [id=7300069]
2025-03-21T16:57:46.428-0700 [DEBUG] provider.terraform-provider-rollbar_v1.15.1: {"level":"debug","notificationID":7300069,"time":"2025-03-21T16:57:46-07:00","message":"Reading notification from API"}
2025-03-21T16:59:02.939-0700 [DEBUG] provider.terraform-provider-rollbar_v1.15.1: {"level":"error","notificationID":7300069,"error":"not found","time":"2025-03-21T16:59:02-07:00"}

Note that it appears to have taken over a minute and that there is a "not found" message. We have lots of notifications and so this is taking an hour plus to refresh them all!

From looking at the code, it looks like there is retry logic implemented and that it kicks in if a 404 not found is returned.

I believe the slowness is b/c we had a bunch of notifications removed via the UI and so the provider is 404ing when trying to fetch resources via the api which is causing retries to happen up to the retry limit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions