Skip to content

fix(ctcOpen,ctcClose): default package-manager-version to empty, not '10' - #196

Merged
madhur310 merged 2 commits into
mainfrom
fix/ctcopen-default-pnpm-version
Oct 16, 2026
Merged

madhur310 merged 2 commits into
mainfrom
fix/ctcopen-default-pnpm-version

Conversation

@madhur310

@madhur310 madhur310 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Both ctcOpen.yml and ctcClose.yml default package-manager-version to '10' and pass it unconditionally to pnpm/action-setup whenever package-manager: pnpm is set -- even though pnpm/action-setup already knows how to read the pnpm version from the caller's package.json packageManager field on its own.
  • Any caller whose package.json pins a different pnpm version (e.g. pnpm@12.8.2) hits a hard error: Multiple versions of pnpm specified from pnpm/action-setup, because that action only errors when its version input is a mismatched, non-empty value.
  • Fix: default package-manager-version to '' in both workflows instead of '10'. This lets pnpm/action-setup's own resolution take over, so callers don't need to duplicate (and keep in sync by hand) a pnpm version that's already declared in their package.json.
  • No other caller in the org currently sets package-manager: pnpm (confirmed via gh search code "package-manager: pnpm"), so this is a no-op for every existing workflow and only changes behavior for pnpm adopters going forward.

Context

Hit this in forcedotcom/salesforcedx-vscode's publishVSCode.yml/publishOpenVSX.yml (pnpm monorepo), which had to work around it with explicit package-manager-version: '' overrides on both the ctc-open and ctcClose job calls -- see forcedotcom/salesforcedx-vscode#8466 and #8467. This PR fixes it at the source so future pnpm callers don't need to know about the gotcha.

Test plan

  • Merge
  • Next forcedotcom/salesforcedx-vscode release publish confirms ctc-open/ctcClose still succeed (now redundant with their own overrides, but harmless)

🤖 Generated with Claude Code

Any pnpm caller whose package.json pins a different pnpm version via
the packageManager field (e.g. pnpm@12.8.2) hits a hard error from
pnpm/action-setup: 'Multiple versions of pnpm specified' -- because
this workflow was passing version: '10' unconditionally whenever
package-manager: pnpm is set, even though pnpm/action-setup already
knows how to read packageManager from package.json on its own.

Defaulting to an empty string lets pnpm/action-setup's own version
resolution take over (it only errors when the version input is a
*mismatched non-empty* value), so callers don't need to duplicate
their pnpm version here and keep it in sync by hand.

No other caller currently sets package-manager: pnpm, so this is a
no-op for every existing workflow and only changes behavior for new
pnpm adopters (fixes forcedotcom/salesforcedx-vscode's publishVSCode.yml
and publishOpenVSX.yml, which previously had to work around this with
an explicit package-manager-version: '' override).
Same bug as ctcOpen.yml (previous commit in this PR): defaulting to
'10' forces an explicit version into pnpm/action-setup, which then
conflicts with any caller's package.json packageManager field. Empty
string lets it resolve the version from packageManager on its own.

Confirmed needed in forcedotcom/salesforcedx-vscode's publishVSCode.yml/
publishOpenVSX.yml ctcCloseSuccess/ctcCloseFail jobs -- see
forcedotcom/salesforcedx-vscode#8467.
@madhur310 madhur310 changed the title fix(ctcOpen): default package-manager-version to empty, not '10' fix(ctcOpen,ctcClose): default package-manager-version to empty, not '10' Oct 16, 2026

@mshanemc mshanemc 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.

I like this change; worth an agentic github search to know who's using it. IIRC we left the 10 on there because somebody was using it and had expected 10.

so check to see who that is and make sure they either pass the version they want OR have packageManager set correctly in the pjson

@madhur310

Copy link
Copy Markdown
Contributor Author

Ran the agentic search — checked both salesforcecli and forcedotcom orgs for every form (package-manager: pnpm, packageManager: pnpm, direct uses: of ctcOpen.yml/ctcClose.yml and the composite .github/actions/ctcOpen/ctcClose):

  • The only caller anywhere that explicitly sets package-manager: pnpm is forcedotcom/salesforcedx-vscode itself (publishVSCode.yml, publishOpenVSX.yml) — already carries the package-manager-version: '' override, since hitting this exact bug is what prompted this PR (see #8466/#8467).
  • salesforcecli/cli's promote.yml sets package-manager: yarn explicitly — not pnpm, unaffected.
  • npmPublish.yml's own packageManager input defaults to yarn, not pnpm, so none of the ~50 plugin-* repos going through onRelease.yml → npmPublish.yml (none override packageManager) are affected either way.
  • salesforcecli/mcp and salesforcecli/cli both also call the composite action .github/actions/ctcOpen@main directly (a separate code path) — neither sets package-manager there, so they get that action's own default (npm), unaffected.

So no current caller breaks from this change. One related gap found along the way, not fixed here: .github/actions/ctcOpen/action.yml (the composite action, actively used by salesforcecli/mcp and salesforcecli/cli) has the identical package-manager-version: '10' default bug — just not currently triggered since neither of its callers sets package-manager: pnpm yet. Happy to open a follow-up for that one.

(Caveat: gh search code doesn't index forks and can lag on very recent pushes, so this is thorough but not a 100% exhaustive guarantee.)

@madhur310
madhur310 merged commit 05c2fc3 into main Oct 16, 2026
3 checks passed
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.

2 participants