Skip to content

monitoring: make workloads dashboard plan idempotent - #237

Merged
ejahnGithub merged 6 commits into
sigstore:mainfrom
ejahnGithub:ejahn/workloads-dashboard-idempotent
Jul 9, 2026
Merged

monitoring: make workloads dashboard plan idempotent#237
ejahnGithub merged 6 commits into
sigstore:mainfrom
ejahnGithub:ejahn/workloads-dashboard-idempotent

Conversation

@ejahnGithub

Copy link
Copy Markdown
Contributor

The GCP Monitoring API strips default-valued fields (xPos: 0, yPos: 0) from the dashboard JSON it returns, so every subsequent terraform plan against google_monitoring_dashboard.workloads shows a spurious + xPos = 0 / + yPos = 0 update.

Example drift from a recent staging apply: https://github.com/sigstore/public-good-instance/actions/runs/27028115518/job/79773220251

Drop the explicit zero defaults from gcp/modules/monitoring/infra/workloads.json so the rendered config matches what the API returns. No behavioral change — the resulting dashboard layout is identical.

@ejahnGithub
ejahnGithub requested a review from a team as a code owner June 8, 2026 17:29
@Hayden-IO

Copy link
Copy Markdown
Contributor

Please sign the DCO

@Hayden-IO

Copy link
Copy Markdown
Contributor

Can you also add a small temporary edit to one of the terraform configs so we can verify the plan?

The GCP Monitoring API strips default-valued fields (xPos: 0, yPos: 0)
from the dashboard JSON it returns, so every subsequent terraform plan
showed a spurious 'xPos = 0' / 'yPos = 0' update against the workloads
dashboard. Drop the explicit zero defaults from the source JSON so the
rendered config matches what the API returns.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
@ejahnGithub
ejahnGithub force-pushed the ejahn/workloads-dashboard-idempotent branch from 57a082f to df09feb Compare June 9, 2026 20:28
ejahnGithub and others added 4 commits June 9, 2026 16:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
dashboard_json = <<EOF
{
"displayName": "Spanner CPU Alerts",
"displayName": "Spanner CPU Alerts.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You don't need to change this, I think Hayden meant something else when he asked for a temporary change.

@cmurphy

cmurphy commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@Hayden-IO we can't verify the terraform plan from this repo, that's only in public-good-instance. We may as well merge this and then update the ref in pgi to see if it works.

@cmurphy

cmurphy commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

@ejahnGithub or @Hayden-IO could we move this forward?

@Hayden-IO

Copy link
Copy Markdown
Contributor

Sorry, I've mixed this up before too...yea, let's undo that temp change and merge.

@cmurphy

cmurphy commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

@ejahnGithub any update? The display name change should be undone before we merge this.

@Hayden-IO

Copy link
Copy Markdown
Contributor

@ejahnGithub Bumping PR, see above comment

The trailing-period tweak on the Spanner CPU Alerts dashboard displayName
was only added to verify the terraform plan; revert it so the source
matches the intended state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>

@Hayden-IO Hayden-IO left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks!

@ejahnGithub
ejahnGithub merged commit 8464d3d into sigstore:main Jul 9, 2026
10 checks passed
@ejahnGithub
ejahnGithub deleted the ejahn/workloads-dashboard-idempotent branch July 9, 2026 18:40
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.

3 participants