Skip to content

Migrate disabled alert config#2668

Merged
rooneyshuman merged 4 commits intomainfrom
rooneyshuman/542767/migrate-disabled-alert-config
Apr 10, 2026
Merged

Migrate disabled alert config#2668
rooneyshuman merged 4 commits intomainfrom
rooneyshuman/542767/migrate-disabled-alert-config

Conversation

@rooneyshuman
Copy link
Copy Markdown
Contributor

@rooneyshuman rooneyshuman commented Apr 7, 2026

Review Guide

This PR migrates grafana_asserts_suppressed_assertions_config from SDKv2 to the Plugin Framework.

resource_disabled_alert_config.go - standard Framework rewrite. Notable:

  • disabledAlertConfigResource holds *assertsapi.APIClient and int64 stackID directly, injected via Configure
  • id is a new computed attribute with UseStateForUnknown() (set to name on read, consistent with other asserts resources)
  • name retains RequiresReplace() — equivalent to the previous ForceNew: true
  • match_labels is schema.MapAttribute{ElementType: types.StringType}, populated with types.MapValueFrom
  • Private put helper handles upsert via PutDisabledAlertConfig
  • Private read helper retains eventual-consistency retry via withRetryRead (SDKv2 helper/retry aliased as sdkretry)
  • ImportState implemented using the read helper rather than resource.ImportStatePassthroughID, so import populates the full model

docs/ - generated; make docs produces no changes to the asserts suppressed assertions config page.

Issue ref

https://github.com/grafana/deployment_tools/issues/542767

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

In order to lower resource usage and have a faster runtime, PRs will not run Cloud tests automatically.
To do so, a Grafana Labs employee must trigger the cloud acceptance tests workflow manually.

@rooneyshuman
Copy link
Copy Markdown
Contributor Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5fc3223184

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@rooneyshuman rooneyshuman marked this pull request as ready for review April 8, 2026 04:41
@rooneyshuman rooneyshuman requested a review from a team as a code owner April 8, 2026 04:41
Copy link
Copy Markdown

@jgehrett jgehrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm new to this codebase so asked Claude for some help. I only have a couple questions / suggestions

Copy link
Copy Markdown

@jgehrett jgehrett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rooneyshuman rooneyshuman merged commit 6b19029 into main Apr 10, 2026
44 checks passed
@rooneyshuman rooneyshuman deleted the rooneyshuman/542767/migrate-disabled-alert-config branch April 10, 2026 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants