trace-pulumi-diff

Trace pending Pulumi stack changes to merged pull requests on GitHub.

3.2k|266|Updated Mar 22, 2024
One-click install
npx skills add https://github.com/marin-community/marin --skill trace-pulumi-diff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trace-pulumi-diff
Source: https://github.com/marin-community/marin/tree/main/.agents/skills/trace-pulumi-diff
Command: npx skills add https://github.com/marin-community/marin --skill trace-pulumi-diff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When a Pulumi stack shows unapplied changes or drift, it is hard to know which merged pull requests caused each pending resource change. This Skill runs a read-only preview of a Marin infra/pulumi stack and attributes every pending change to the specific PR that introduced it.

Core Features & Use Cases

  • Read-Only Preview: Runs pulumi preview --diff from a clean checkout of origin/main without ever mutating stack state.
  • Deployed Baseline Detection: Reads Pulumi stack history to find the last successful update with a clean Git checkout, establishing an exact commit baseline.
  • PR Attribution: Matches each previewed resource change to commits and merged pull requests via the GitHub API, flagging unmatched changes as live drift.
  • Use Case: An on-call engineer sees unexpected drift on the production GKE stack and needs to know which merged PRs explain the pending NodePool replacement before approving any deployment.

Quick Start

Use the trace-pulumi-diff skill to preview the production stack and tell me which pull requests explain each pending change.

Frequently Asked Questions about trace-pulumi-diff

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find which PR caused a Pulumi stack change?

Run a read-only pulumi preview with --diff, then compare the deployed commit from stack history against origin/main using git log. Match each previewed resource change to commits with git show and map them to pull requests via the GitHub API.

How to preview Pulumi changes without applying them?

Use pulumi preview --stack <stack> --diff from a clean checkout of origin/main. This shows pending resource changes without modifying state, unlike pulumi up, refresh, or destroy, which this workflow explicitly forbids.

What happens if the Pulumi stack history has no clean Git commit?

Attribution stops when the last successful update lacks a git.head commit on origin/main or records git.dirty as true. The Skill reports that an exact Git baseline is unavailable rather than guessing at causes.

Can this workflow modify or destroy Pulumi infrastructure?

No. The workflow is strictly read-only and never runs pulumi up, refresh, destroy, imports, or any state mutation. It only previews changes and inspects history, explicitly calling out risky events like NodePool replacements.

Why do some Pulumi preview changes have no matching pull request?

Changes with no matching commit in the deployed-to-main range are reported as live drift or unresolved attribution. This typically indicates manual console edits or out-of-band modifications rather than merged code changes.