Skip to content

Migrate grafana_organization_preferences to use Framework SDK#2549

Draft
suntala wants to merge 23 commits intomainfrom
suntala/migrate-grafana_organization_preferences
Draft

Migrate grafana_organization_preferences to use Framework SDK#2549
suntala wants to merge 23 commits intomainfrom
suntala/migrate-grafana_organization_preferences

Conversation

@suntala
Copy link
Copy Markdown
Contributor

@suntala suntala commented Feb 24, 2026

@github-actions
Copy link
Copy Markdown
Contributor

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.

@suntala suntala changed the title Migrate grafana_annotation to use Framework SDK Migrate grafana_organization_preferences to use Framework SDK Feb 24, 2026
t := time.UnixMilli(annotation.Time)
tEnd := time.UnixMilli(annotation.TimeEnd)

// Convert tags to set; use null when empty so state matches plan (optional attribute unset).
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

CI fails without these annotation changes.

var err error

text := d.Get("text").(string)
panelID := int64(0)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

CI fails without these annotation changes.

@suntala suntala force-pushed the suntala/migrate-grafana_organization_preferences branch 3 times, most recently from 6cf3d2c to 83f4596 Compare March 5, 2026 12:46
@github-actions
Copy link
Copy Markdown
Contributor

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.

@suntala suntala force-pushed the suntala/migrate-grafana_organization_preferences branch 3 times, most recently from c13efdf to 8671ffc Compare March 27, 2026 14:11
@suntala suntala force-pushed the suntala/migrate-grafana_organization_preferences branch from 8671ffc to 8de88d8 Compare March 27, 2026 14:12
@suntala suntala force-pushed the suntala/migrate-grafana_organization_preferences branch from be61d3d to af7c8b8 Compare March 27, 2026 14:59
suntala added 3 commits March 27, 2026 16:07
Evidence: oss-other job 68893502828 had PUT /org/preferences 401 until old
retry exhaustion (~8m). 8x2s often ends before Grafana propagates org
membership. Use 15x3s (~42s max delay) — well under long loops yet enough
for intermittent 401 after new org.
…test split)

- Always apply WithOrgID on cloned client after resolving org id (parse or fallback).
- Two-phase PUT when home_dashboard_uid is set (general prefs then full body).
- Split TestAccResourceOrganizationPreferences: apply prefs without home dashboard
  UID before adding it (OSS acc 401 mitigation).
- Keep NDJSON debug hooks for GRAFANA_ORG_PREFS_DEBUG_LOG until CI green.
- Org preferences: phased PUT retained; 2s settle on create for org_id!=1; retry 403 like 401
- Debug: NDJSON (.ndjson), repo mirror, tflog/CI artifact/summary; Update A log; unit test for debug write
- CI: GRAFANA_PULL_POLICY wired to compose --pull; mysql pull_policy; integration docker-cache + retry
- Makefile: export GRAFANA_PULL_POLICY for compose; integration-test passes pull policy to test.sh
- test.sh: compose -f/--project-directory from repo root for correct volume paths
- gitignore org-prefs-debug-42b169.ndjson
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.

1 participant