Skip to content

feat(nodejs): switch from npm to bun in parametric and AI framework weblogs#7012

Open
rochdev wants to merge 2 commits into
mainfrom
rochdev/feat-npm-to-bun
Open

feat(nodejs): switch from npm to bun in parametric and AI framework weblogs#7012
rochdev wants to merge 2 commits into
mainfrom
rochdev/feat-npm-to-bun

Conversation

@rochdev
Copy link
Copy Markdown
Member

@rochdev rochdev commented May 22, 2026

Summary

  • Replaces npm with bun for dependency installation in parametric tests
  • Switches anthropic-js, openai-js, and google-genai-js weblogs to use bun install
  • Adds bun.lock lockfiles for reproducible builds
  • Removes install_ddtrace.sh from the shellcheck TODO list (now clean)

Dependencies

None — this PR is independent and can be merged in any order.

Test plan

  • Verify parametric tests build and run with bun
  • Verify anthropic-js, openai-js, google-genai-js weblogs build correctly

🤖 Generated with Claude Code

…eblogs

Replaces npm with bun for dependency installation in parametric tests
and AI framework weblogs (anthropic-js, openai-js, google-genai-js),
using frozen lockfiles and hoisted linker for reproducible builds.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

CODEOWNERS have been resolved as:

utils/build/docker/nodejs/anthropic_app/bun.lock                        @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/google_genai_app/bun.lock                     @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/openai_app/bun.lock                           @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/parametric/bun.lock                           @DataDog/dd-trace-js @DataDog/system-tests-core
.shellcheck                                                             @DataDog/system-tests-core
utils/build/docker/nodejs/anthropic-js.Dockerfile                       @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express4-typescript.Dockerfile                @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express4.Dockerfile                           @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express5.Dockerfile                           @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/fastify.Dockerfile                            @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/google_genai-js.Dockerfile                    @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/install_ddtrace.sh                            @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/nextjs.Dockerfile                             @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/openai-js.Dockerfile                          @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/parametric/Dockerfile                         @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/uds-express4.Dockerfile                       @DataDog/dd-trace-js @DataDog/system-tests-core

@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

datadog-datadog-prod-us1-2 Bot commented May 22, 2026

Pipelines  Tests

Fix all issues with BitsAI

⚠️ Warnings

🚦 2 Pipeline jobs failed

Testing the test | System Tests (php, dev) / End-to-end #1 / php-fpm-7.4 1   View in Datadog   GitHub Actions

🔄 Retry job. This looks flaky and may succeed on retry. Connection timeout when trying to reach Docker registry: net/http: request canceled while waiting for connection.

Testing the test | all-jobs-are-green   View in Datadog   GitHub Actions

🔄 Retry job. This looks flaky and may succeed on retry. Some CI checks or statuses failed. Please check the summary table.

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: ad9ef10 | Docs | Datadog PR Page | Give us feedback!

The install_ddtrace.sh script now uses bun, but it was not installed
in the weblog images (express4, express5, express4-typescript, fastify,
nextjs, uds-express4).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@rochdev rochdev marked this pull request as ready for review May 29, 2026 20:53
@rochdev rochdev requested review from a team as code owners May 29, 2026 20:53
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad9ef10a6b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

target=$(run_without_node_env npm pack /binaries/dd-trace-js)
echo "install from local folder /binaries/dd-trace-js"
install_custom_target "$target"
run_without_node_env bun add "${BUN_ARGS[@]}" /binaries/dd-trace-js || run_without_node_env bun add "${BUN_ARGS[@]}" /binaries/dd-trace-js
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore packing for cloned dd-trace-js sources

When binaries/dd-trace-js is present (the documented “clone a custom tracer in binaries” flow), this now installs the source directory directly with bun add instead of first running npm pack. The previous npm pack path ran the package lifecycle before producing the tarball; npm documents npm pack as running prepack/prepare, and current dd-trace-js defines those scripts plus a files list for generated artifacts. I also checked bun add --help/Bun docs and reproduced that bun add --trust /path/to/pkg does not run prepack, so the image can end up with an unprepared dd-trace checkout and fail to load missing generated files. Please keep packaging the local checkout (or explicitly run the equivalent lifecycle) before installing it.

Useful? React with 👍 / 👎.

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