Skip to content

ci: validate pulumi/esc-action fix (pin to 197ccaa)#18927

Closed
borisschlosser wants to merge 2 commits into
masterfrom
fix-esc-action-oidc-auth
Closed

ci: validate pulumi/esc-action fix (pin to 197ccaa)#18927
borisschlosser wants to merge 2 commits into
masterfrom
fix-esc-action-oidc-auth

Conversation

@borisschlosser
Copy link
Copy Markdown
Contributor

@borisschlosser borisschlosser commented May 13, 2026

Summary

Validates the upstream fix in pulumi/esc-action@197ccaa ("Fix oidc-auth default breaking ESC_ACTION_OIDC_AUTH env-var fallback", from pulumi/esc-action#43, fixes pulumi/esc-action#42) by pinning every esc-action invocation in this repo to that exact SHA.

A green CI on this PR is the validation signal: if jobs authenticate successfully against the pinned SHA without any consumer-side workaround, the upstream fix is working.

Background

The pulumi/esc-action v1 tag was moved on 2026-05-13 ~02:26 UTC (when pulumi/esc-action#41 landed) to a commit that included an earlier regression from pulumi/esc-action#35oidc-auth was declared in action.yml with default: 'false'.

The action's input/env helper is:

function getInput(name: string, envVar: string): string | undefined {
    const val = core.getInput(name) || process.env[`ESC_ACTION_${envVar}`];
    ...
}

Once core.getInput('oidc-auth') started returning the non-empty string 'false' by default, the || process.env[...] fallback never fired — silently disabling OIDC for every consumer that configured the action via the ESC_ACTION_OIDC_AUTH=true env-var pattern. esc then errored out with:

##[error]`esc open` command failed:
Error: could not determine current cloud: PULUMI_ACCESS_TOKEN must be set for login during non-interactive CLI sessions

This broke every open PR (#18925, #18923, #18920, ...) and scheduled jobs.

The upstream fix changes the oidc-auth default in action.yml from 'false' to '', matching the other oidc-* inputs, so core.getInput returns falsy and the env-var fallback works again.

What this PR does

  1. Commit 1 added a consumer-side workaround (with: oidc-auth: true on every invocation) to unblock CI immediately.
  2. Commit 2 removes that workaround and pins every pulumi/esc-action@v1 reference to @197ccaa42ab49560ce838a3010eb8345ce086896 so this PR's CI exercises only the upstream fix.

24 workflow files updated; all 30 workflow YAML files parse OK.

Follow-up

Once the v1 tag is moved to include the fix, swap the pinned SHA back to @v1 in a follow-up PR.

Test plan

  • CI on this PR passes — proves the upstream fix restores the env-var fallback
  • Spot-check pull-request.yml, build-and-deploy.yml, pulumi-cli.yml, and esc-cli.yml show the pinned SHA and no with: blocks on esc-action steps
  • After validation, follow-up PR to move pin back to @v1

🤖 Generated with Claude Code

The pulumi/esc-action v1 tag was moved today (2026-05-13) to a commit
that includes pulumi/esc-action#35 ("Add missing inputs"), which
declared oidc-auth as an explicit input with default: 'false' in
action.yml.

The action's getInput helper is:

    const val = core.getInput(name) || process.env[`ESC_ACTION_${envVar}`];

Now that core.getInput('oidc-auth') returns the non-empty string
'false' by default, the env-var fallback never fires and OIDC is
silently disabled. esc then falls back to PULUMI_ACCESS_TOKEN, which
isn't set, and every CI job using the ESC_ACTION_OIDC_AUTH env-var
pattern fails:

    Error: could not determine current cloud:
    PULUMI_ACCESS_TOKEN must be set for login during non-interactive
    CLI sessions

Pass oidc-auth: true explicitly on each invocation so the input
value wins regardless of the action's default. Only oidc-auth needs
this — the other oidc-* inputs default to '' (falsy), so the env-var
fallback still works for them.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 13, 2026

Docs review

Scope: 24 GitHub Actions workflow files modified to add with: oidc-auth: true to every pulumi/esc-action@v1 invocation. No content (docs/blog) changes.

Verification of fix completeness

  • Counted pulumi/esc-action@v1 invocations per workflow and matched against oidc-auth: true occurrences. Coverage is complete across all 24 files:
    • 1-invocation files (16): all patched once.
    • 2-invocation files (6: build-and-deploy.yml, pull-request.yml, testing-build-and-deploy.yml, scheduled-test.yml, scheduled-upstream-sync.yaml, schedule-social.yml, update-search-index.yml): all patched twice.
    • 3-invocation files (5: customer-managed-workflow-agent-cli.yml, esc-cli.yml, pulumi-cli.yml, pulumi-cli-dev-version.yml, pulumi-dotnet-sdk.yml, pulumi-java-sdk.yml): all patched three times.
  • The existing ESC_ACTION_OIDC_AUTH: true env-vars are still in place in all 24 workflows (verified with grep). This is a belt-and-suspenders fix — the explicit with: now takes precedence; the env-var remains as a safety net.
  • YAML indentation of the new with: blocks is consistent with surrounding step formatting.

Suggestions (non-blocking)

  1. BUILD-AND-DEPLOY.md:2718-2727 — the Pulumi ESC example is now out of date. The documented snippet shows PULUMI_ACCESS_TOKEN-based auth, but every workflow in the repo actually uses OIDC (ESC_ACTION_OIDC_AUTH). Now that we're standardizing on the explicit with: oidc-auth: true pattern, this is a good moment to refresh the example so it matches actual usage. Not blocking — this drift predates this PR.

    - uses: pulumi/esc-action@v1
      with:
        organization: pulumi
        environment: github-secrets/pulumi-docs
        oidc-auth: true
    
  2. Follow-up reminder. The PR description mentions an upstream issue link to be filed ("link to be added once filed"). Worth updating the description with the actual issue URL once it exists, so the revert path is discoverable.

Other notes

  • Changes are scoped strictly to workflow files — no Hugo content, no scripts/, no Makefile changes. Style-guide criteria don't apply.
  • The root-cause analysis in the PR description (PR Ensure all doc examples start with JavaScript instead of TypeScript #35 adding default: 'false', short-circuiting the core.getInput() || process.env[...] fallback) is consistent with the JS || semantics described, and the fix (passing oidc-auth: true explicitly so core.getInput returns the truthy intended value) is the minimal correct change.

Verdict

LGTM as a CI hotfix. The two suggestions above are housekeeping, not blockers.

Mention me (@claude) if you'd like another pass or want me to take a stab at the BUILD-AND-DEPLOY.md refresh in a follow-up.

@pulumi-bot
Copy link
Copy Markdown
Collaborator

pulumi-bot commented May 13, 2026

Copy link
Copy Markdown
Member

@fnune fnune left a comment

Choose a reason for hiding this comment

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

TY

Validates the upstream fix in pulumi/esc-action@197ccaa
("Fix oidc-auth default breaking ESC_ACTION_OIDC_AUTH env-var fallback")
by:

- Pinning every esc-action invocation to that exact SHA, and
- Removing the `with: oidc-auth: true` workaround added in the previous
  commit on this branch.

If CI passes, it proves the upstream fix restores the env-var fallback
path on its own — no consumer-side workaround needed. Once the v1 tag is
moved to include the fix, we can revert to pulumi/esc-action@v1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@borisschlosser borisschlosser changed the title ci: pass oidc-auth: true explicitly to pulumi/esc-action@v1 ci: validate pulumi/esc-action fix (pin to 197ccaa) May 13, 2026
@borisschlosser
Copy link
Copy Markdown
Contributor Author

Pushed v1 tag in esc-action repo which includes the actual fix: pulumi/esc-action#43

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.

Regression: oidc-auth: 'false' default in action.yml breaks ESC_ACTION_OIDC_AUTH env-var pattern

3 participants