Skip to content

feat: add PULUMI_LOCK_METADATA env var for arbitrary lock file metadata#1

Open
jld-adriano wants to merge 1 commit intomasterfrom
exa/lock-metadata
Open

feat: add PULUMI_LOCK_METADATA env var for arbitrary lock file metadata#1
jld-adriano wants to merge 1 commit intomasterfrom
exa/lock-metadata

Conversation

@jld-adriano
Copy link
Copy Markdown

@jld-adriano jld-adriano commented Apr 1, 2026

When PULUMI_LOCK_METADATA is set to a JSON object of string key-value pairs, those pairs are written into the lock file under a 'metadata' field. This allows CI systems to embed run IDs, runner names, and other context into Pulumi's native lock file so that stale locks can be easily traced back to the job that created them.

The metadata field is omitted from the lock file when the env var is unset or empty, so this is fully backward-compatible.

Summary

Test plan

  • Added appropriate unit tests - For all changes
  • Added a test in pkg/engine/lifecycletest - For all engine/protocol changes
  • Added a conformance test in pkg/testing/pulumi-test-language - For language protocol changes
  • Added a golden test in pkg/backend/display - For changes to the output renderers

Validation

  • make lint — clean
  • make test_fast — all pass
  • make tidy_fix — clean
  • make format_fix — clean
  • Relevant SDK tests pass (if SDK changes)
  • make check_proto — clean (if proto changes)

Changelog

  • Changelog entry added. If you do not believe this PR requires a changelog, ask a maintainer to apply
    the impact/no-changelog-required label.

Risk


Open with Devin

When PULUMI_LOCK_METADATA is set to a JSON object of string key-value pairs,
those pairs are written into the lock file under a 'metadata' field. This
allows CI systems to embed run IDs, runner names, and other context into
Pulumi's native lock file so that stale locks can be easily traced back to
the job that created them.

The metadata field is omitted from the lock file when the env var is unset
or empty, so this is fully backward-compatible.

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Copy link
Copy Markdown

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

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