Skip to content

fix(ci): use global install for datadog-ci and fix pnpm link syntax#255

Merged
bobobowis merged 1 commit into
mainfrom
deploy-pnpm
Jul 16, 2026
Merged

fix(ci): use global install for datadog-ci and fix pnpm link syntax#255
bobobowis merged 1 commit into
mainfrom
deploy-pnpm

Conversation

@bobobowis

@bobobowis bobobowis commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Overview

Issue 1: pnpm link bad params in setup-jarvis

Error

[ERR_PNPM_LINK_BAD_PARAMS] Cannot link by package name.
Use a relative or absolute path instead.

Why
yarn link registers a package globally by name: yarn link then yarn link @typeform/jarvis.
pnpm link requires a path: pnpm link /path/to/pkg.

The setup-jarvis composite action was doing pnpm link @typeform/jarvis (name-based) after yarn link registered it.

Fix.github/shared-actions/setup-jarvis/action.yml

# Before
yarn link @typeform/jarvis   # name-based — works with yarn
pnpm link @typeform/jarvis   # name-based — BREAKS with pnpm

# After
pnpm link "$JARVIS_DIR"      # path-based — correct for pnpm

Where: Typeform/.github repo, deploy-pnpm branch, commit 82782b4.


Issue 2: datadog-ci: not found during deploy sourcemaps upload

Error

sh: 1: datadog-ci: not found
Command failed: npx --yes @datadog/datadog-ci@5.21.0 sourcemaps upload dist ...

Why
@datadog/datadog-ci v5 is a meta-package. When invoked via npx, it downloads itself to a temp dir and internally spawns datadog-ci as a subprocess (looking for the binary on $PATH). With yarn, datadog-ci bin was hoisted to node_modules/.bin and was on PATH. With pnpm, it's not.

This was not a package rename issue. The package datadog-ci (unscoped) was deprecated; the correct package is @datadog/datadog-ci. But even with the correct package, v5 spawns a subprocess that needs datadog-ci on PATH.

Fix — two parts:

Fix: install datadog-ci globally in setup-jarvis and add it to $GITHUB_PATH so all subsequent steps — including subprocesses spawned by jarvis — can find the binary.

In setup-jarvis/action.yml (all package managers):

- name: Install datadog-ci globally
  shell: bash
  run: |
    npm install -g @datadog/datadog-ci@5.21.0
    echo "$(npm prefix -g)/bin" >> $GITHUB_PATH

$GITHUB_PATH persists the bin path for all subsequent steps in the job, including subprocesses. export PATH would only work within the same shell process.

In frontend-deploy-workflow.yml and frontend-pr-workflow.yml "Tag pipeline" step — now just:

datadog-ci tag --level pipeline \
  --tags "workflow_version:..." \
  --tags "workflow_file:..."

No conditional, no npx, no per-step install.

Testing

  • Relies on CI runs with pnpm-based repos consuming setup-jarvis

Docs

  • Yes! ✋ I have updated the documentation.

For contributions to the Typeform/.github repo

  • This PR only changes an existing workflow.

@bobobowis bobobowis force-pushed the deploy-pnpm branch 2 times, most recently from 3e25da7 to d0bb46d Compare July 16, 2026 06:19
@bobobowis bobobowis marked this pull request as ready for review July 16, 2026 06:25
@bobobowis bobobowis requested a review from a team as a code owner July 16, 2026 06:25
@gitstream-cm

gitstream-cm Bot commented Jul 16, 2026

Copy link
Copy Markdown

This PR is missing a Jira ticket reference in the title or description.
Please add a Jira ticket reference to the title or description of this PR.

@gitstream-cm

gitstream-cm Bot commented Jul 16, 2026

Copy link
Copy Markdown

🥷 Code experts: kb-typeform

kb-typeform, bobobowis have most 👩‍💻 activity in the files.
kb-typeform, bobobowis have most 🧠 knowledge in the files.

See details

.github/workflows/frontend-deploy-workflow.yml

Activity based on git-commit:

kb-typeform bobobowis
JUL 18 additions & 2 deletions
JUN
MAY
APR 4 additions & 0 deletions 48 additions & 3 deletions
MAR 59 additions & 31 deletions
FEB 374 additions & 9 deletions

Knowledge based on git-blame:
kb-typeform: 81%
bobobowis: 8%

.github/workflows/frontend-pr-workflow.yml

Activity based on git-commit:

kb-typeform bobobowis
JUL 18 additions & 2 deletions
JUN
MAY
APR 5 additions & 2 deletions
MAR 65 additions & 28 deletions
FEB 273 additions & 92 deletions

Knowledge based on git-blame:
kb-typeform: 84%
bobobowis: 2%

shared-actions/setup-jarvis/action.yml

Activity based on git-commit:

kb-typeform bobobowis
JUL 25 additions & 13 deletions
JUN
MAY
APR
MAR
FEB

Knowledge based on git-blame:
kb-typeform: 67%
bobobowis: 33%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

@bobobowis bobobowis merged commit 0825b31 into main Jul 16, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants