Skip to content

fix: correct ingest payload shape to match dashboard API#22

Merged
omrdev1 merged 4 commits intomainfrom
fix/ingest-payload-shape
Mar 31, 2026
Merged

fix: correct ingest payload shape to match dashboard API#22
omrdev1 merged 4 commits intomainfrom
fix/ingest-payload-shape

Conversation

@omrdev1
Copy link
Copy Markdown
Owner

@omrdev1 omrdev1 commented Mar 31, 2026

Problem

The telemetry step in action.yml was sending the raw PlanAnalysisResult shape wrapped in a legacy envelope ({ repository, analysis: ... }). The dashboard ingest endpoint expects a flat ReportPayload with runId, repo, totals etc. at the root level. The mismatch caused silent 400 errors (swallowed by || true).

Fix

Rewrites the jq transform to build the correct ReportPayload shape the ingest endpoint expects, including all required fields (runId, repo, branch, actor, commitSha, prNumber, analysedAt, totals, resourceCount, recommendationCount, skippedCount, unsupportedTypes).

Test plan

  • Merge and watch Actions tab — e2e workflow should trigger
  • Check dashboard shows new runs from AWS, Azure, GCP fixtures

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

🌱 GreenOps Infrastructure Impact

Metric Monthly Total
🔋 Scope 2 — Operational CO2e 4.74kg
🏭 Scope 3 — Embodied CO2e 1.88kg
🌍 Total Lifecycle CO2e 6.61kg
💧 Water Consumption 5.9L
💰 Infrastructure Cost $132.86/month

Potential Scope 2 Savings: -4.33kg CO2e/month (91.3%) | -$8.03/month
💡 Found 1 optimization recommendation.

Resource Breakdown

Resource Type Region Scope 2 CO2e Scope 3 CO2e Water Cost/mo Action
google_compute_instance.api n2-standard-2 us-central1 4.57kg 1.04kg 4.9L 70.81 💡 View Recommendation
google_compute_instance.worker t2a-standard-2 europe-north1 0.17kg 0.83kg 1.0L 62.05 ✅ Optimal

Recommendations

google_compute_instance.api

  • Current: n2-standard-2 in us-central1
  • Suggested: n2-standard-2 in europe-north1
  • Scope 2 Impact: -4.33kg CO2e/month | +$8.03/month
  • Rationale: Moving n2-standard-2 from us-central1 to Finland (europe-north1) reduces grid carbon intensity from 340g to 18g CO2e/kWh, saving 4327g CO2e/month (note: cost increases by $8.03/month). Water consumption also decreases by 3.4L/month.

Emissions calculated using the Open GreenOps Methodology Ledger v2.0.0. Scope 2 (operational) and Scope 3 (embodied) emissions tracked. Water consumption estimated from provider sustainability reports (AWS 2023, Microsoft 2023, Google 2023). Math is MIT-licensed and auditable. Analysed at 2026-03-31T21:53:52.167Z.

🏢 GreenOps Dashboard — aggregate carbon trends across all your repositories and export ESG reports. Get started free

@omrdev1 omrdev1 merged commit 012a5db into main Mar 31, 2026
2 checks passed
@omrdev1 omrdev1 deleted the fix/ingest-payload-shape branch March 31, 2026 22:03
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