Skip to content

Conversation

@sidharth-chauhan
Copy link

This PR fixes #2169.

The labels and dynamic_labels fields for grafana_oncall_integration were previously treated as lists, making Terraform detect diffs when only the order of labels changed. Since the OnCall API does not treat label order as significant, this caused unnecessary perma-diffs.

Changes

  • Updated schema definitions for labels and dynamic_labels to use TypeSet instead of TypeList.
  • Adjusted expand/flatten helpers for labels to support the new schema.
  • Updated acceptance tests to validate label handling.
  • Updated documentation examples to reflect the new labels and dynamic_labels format.

Outcome

Terraform will now treat labels and dynamic_labels as order-insensitive, preventing diffs when only their order changes.

Notes

  • All local unit tests pass.
  • Acceptance tests skipped locally (no Grafana Cloud credentials available). These will run in CI.

@sidharth-chauhan sidharth-chauhan requested review from a team as code owners September 9, 2025 16:30
@sidharth-chauhan sidharth-chauhan requested review from Ferril and willgallego-grafana and removed request for a team September 9, 2025 16:30
@sidharth-chauhan
Copy link
Author

Hi @Ferril @willgallego-grafana, I’m following up on this PR to check if there’s anything else needed from my side or if I should wait for workflow approval and your review. Thanks for your time.

@sidharth-chauhan
Copy link
Author

I’ve rebased the branch as suggested. Some acceptance tests are failing, but they don’t seem related to the change here. Please let me know if I should investigate this further or if they need to be rerun.
@stephan-rayner

@Duologic Duologic requested review from a team and removed request for a team October 27, 2025 13:38
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.

Oncall integration labels order creates perma-diff

1 participant