Skip to content

fix(ci): build audience-core before SDK bundle in CDN deploy workflow (AUD-239)#2867

Merged
nattb8 merged 3 commits into
mainfrom
fix/audience-cdn-deploy-missing-core-build
Apr 29, 2026
Merged

fix(ci): build audience-core before SDK bundle in CDN deploy workflow (AUD-239)#2867
nattb8 merged 3 commits into
mainfrom
fix/audience-cdn-deploy-missing-core-build

Conversation

@nattb8
Copy link
Copy Markdown
Contributor

@nattb8 nattb8 commented Apr 29, 2026

Summary

  • The deploy-audience-cdn.yaml workflow was failing on every triggered run because it built @imtbl/audience without first building its local workspace dependency @imtbl/audience-core
  • In CI there is no pre-built dist/ folder, so esbuild could not resolve @imtbl/audience-core imports
  • Adds a pnpm --filter @imtbl/audience-core build step immediately before the SDK bundle build

https://linear.app/imtbl/issue/SDK-265/fixci-cdn-deploy-workflow-fails-missing-audience-core-build-step
Broken since: #2863

Test plan

  • Confirm the "Deploy Audience SDK to CDN" workflow passes on merge to main

🤖 Generated with Claude Code


Note

Low Risk
Single-line CI workflow change that only affects build scoping for the CDN deploy job; low risk aside from potentially longer build time or unexpected dependency build interactions.

Overview
The CDN deploy workflow now runs pnpm --filter @imtbl/audience... build instead of building only @imtbl/audience, ensuring its local workspace dependencies (e.g., audience-core) are built as part of the bundle step so the CI build can resolve imports before uploading to S3.

Reviewed by Cursor Bugbot for commit 3727331. Bugbot is set up for automated code reviews on this repo. Configure here.

@nattb8 nattb8 requested review from a team as code owners April 29, 2026 09:00
@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Apr 29, 2026

View your CI Pipeline Execution ↗ for commit 67f5535

Command Status Duration Result
nx affected -t build,lint,test ✅ Succeeded <1s View ↗
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2026-04-29 09:16:57 UTC

… (AUD-239)

The deploy workflow was calling pnpm --filter @imtbl/audience build without
first building its local workspace dependency @imtbl/audience-core, causing
esbuild to fail with "Could not resolve @imtbl/audience-core" because the
dist/ folder did not exist in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

✅ Audience Bundle Size — @imtbl/audience

Metric Size Delta vs main (78b6311)
Gzipped 18249 bytes (17.82 KB) 0 bytes
Raw (minified) 53041 bytes 0 bytes

Budget: 24.00 KB gzipped (warn at 20.00 KB)

@nattb8 nattb8 force-pushed the fix/audience-cdn-deploy-missing-core-build branch from 67f5535 to dd2565b Compare April 29, 2026 09:03
@nattb8 nattb8 enabled auto-merge April 29, 2026 09:04
Comment thread .github/workflows/deploy-audience-cdn.yaml Outdated
@nattb8 nattb8 disabled auto-merge April 29, 2026 09:07
… (AUD-239)

@imtbl/metrics is a workspace dep of audience-core and is inlined by the
SDK bundle build via BUNDLED_WORKSPACE_DEPS. Without its dist/ present in
CI the bundle build would still fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1e58c6b. Configure here.

Comment thread .github/workflows/deploy-audience-cdn.yaml Outdated
Replace three manual build steps with a single
`pnpm --filter @imtbl/audience... build` which automatically builds all
transitive workspace dependencies in the correct order, matching the
pattern already used in audience-bundle-size.yaml.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nattb8 nattb8 added this pull request to the merge queue Apr 29, 2026
Merged via the queue into main with commit 756ce14 Apr 29, 2026
9 checks passed
@nattb8 nattb8 deleted the fix/audience-cdn-deploy-missing-core-build branch April 29, 2026 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants