Skip to content

[nodejs] use npm ci to speed up docker builds#6812

Open
rochdev wants to merge 6 commits intomainfrom
rochdev/npm-ci
Open

[nodejs] use npm ci to speed up docker builds#6812
rochdev wants to merge 6 commits intomainfrom
rochdev/npm-ci

Conversation

@rochdev
Copy link
Copy Markdown
Member

@rochdev rochdev commented Apr 25, 2026

Motivation

Using npm install and then install static versions manually afterwards is much slower than just having everything in the lockfile and using npm ci.

Changes

Use npm ci to speed up docker builds.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed and the CI green, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • Anything but tests/ or manifests/ is modified ? I have the approval from R&P team
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added, removed or renamed?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 25, 2026

CODEOWNERS have been resolved as:

utils/build/docker/nodejs/express4/package-lock.json                    @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express4/package.json                         @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express5/package-lock.json                    @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/express5/package.json                         @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_lambda/function/package-lock.json             @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_otel/express4-otel/package-lock.json          @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_otel/express4-otel/package.json               @DataDog/dd-trace-js @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/nextjs.Dockerfile                             @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs/nextjs/next.config.js                         @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/uds-express4.Dockerfile                       @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_lambda/nodejs-alb-multi.Dockerfile            @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_lambda/nodejs-alb.Dockerfile                  @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_lambda/nodejs-apigw-http.Dockerfile           @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_lambda/nodejs-apigw-rest.Dockerfile           @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_lambda/nodejs-function-url.Dockerfile         @DataDog/dd-trace-js @DataDog/system-tests-core
utils/build/docker/nodejs_otel/express4-otel.Dockerfile                 @DataDog/dd-trace-js @DataDog/system-tests-core

@rochdev rochdev marked this pull request as ready for review April 26, 2026 19:42
@rochdev rochdev requested review from a team as code owners April 26, 2026 19:42
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: 1a47ebf6f9

ℹ️ 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".

Comment thread utils/build/docker/nodejs_lambda/nodejs-alb.Dockerfile Outdated
@datadog-datadog-prod-us1-2
Copy link
Copy Markdown

datadog-datadog-prod-us1-2 Bot commented Apr 27, 2026

Tests

Fix all issues with BitsAI or with Cursor

⚠️ Warnings

🧪 4 Tests failed

tests.appsec.rasp.test_lfi.Test_Lfi_RC_CustomAction.test_lfi_get[php-fpm-8.5] from system_tests_suite   View in Datadog   (Fix with Cursor)
assert 505 == 302
 +  where 505 = HttpResponse(status_code:505, headers:{'Date': 'Mon, 27 Apr 2026 23:46:51 GMT', 'Server': 'Apache/2.4.66 (Ubuntu)', 'T...com/product/security-platform/application-security-monitoring/" target="_blank">Datadog</a></p></footer></body></html>).status_code
 +    where HttpResponse(status_code:505, headers:{'Date': 'Mon, 27 Apr 2026 23:46:51 GMT', 'Server': 'Apache/2.4.66 (Ubuntu)', 'T...com/product/security-platform/application-security-monitoring/" target="_blank">Datadog</a></p></footer></body></html>) = <tests.appsec.rasp.test_lfi.Test_Lfi_RC_CustomAction object at 0x7faeb4b49670>.r3

self = <tests.appsec.rasp.test_lfi.Test_Lfi_RC_CustomAction object at 0x7faeb4b49670>

    def test_lfi_get(self):
        assert self.config_state_1.state == rc.ApplyState.ACKNOWLEDGED
        assert self.config_state_1b.state == rc.ApplyState.ACKNOWLEDGED
        assert self.r1.status_code == 403
...
tests.appsec.test_automated_login_events.Test_V3_Login_Events_RC.test_rc[php-fpm-8.5] from system_tests_suite   View in Datadog   (Fix with Cursor)
KeyError: '_dd.appsec.events.users.login.success.auto.mode'

self = <tests.appsec.test_automated_login_events.Test_V3_Login_Events_RC object at 0x7f809807d9a0>

    def test_rc(self):
        def validate_disabled(meta: dict):
            assert "_dd.appsec.events.users.login.success.auto.mode" not in meta
    
        def validate_anon(meta: dict):
            assert meta["_dd.appsec.events.users.login.success.auto.mode"] == "anonymization"
...
tests.appsec.test_remote_config_rule_changes.Test_BlockingActionChangesWithRemoteConfig.test_block_405[php-fpm-8.5] from system_tests_suite   View in Datadog   (Fix with Cursor)
assert 405 == 505
 +  where 405 = HttpResponse(status_code:405, headers:{'Date': 'Mon, 27 Apr 2026 23:39:51 GMT', 'Server': 'Apache/2.4.66 (Ubuntu)', 'T...customer service team. Security provided by Datadog."}],"security_response_id":"a1b555da-cafa-4ab4-1b76-c9222b22a565"}).status_code
 +    where HttpResponse(status_code:405, headers:{'Date': 'Mon, 27 Apr 2026 23:39:51 GMT', 'Server': 'Apache/2.4.66 (Ubuntu)', 'T...customer service team. Security provided by Datadog."}],"security_response_id":"a1b555da-cafa-4ab4-1b76-c9222b22a565"}) = <tests.appsec.test_remote_config_rule_changes.Test_BlockingActionChangesWithRemoteConfig object at 0x7faeb465d8b0>.response_3

self = <tests.appsec.test_remote_config_rule_changes.Test_BlockingActionChangesWithRemoteConfig object at 0x7faeb465d8b0>

    def test_block_405(self):
        # normal block
        assert self.config_state_1.state == rc.ApplyState.ACKNOWLEDGED
        interfaces.library.assert_waf_attack(self.response_1, rule="ua0-600-56x")
...
tests.appsec.test_suspicious_attacker_blocking.Test_Suspicious_Attacker_Blocking.test_block_suspicious_attacker[php-fpm-8.5] from system_tests_suite   View in Datadog   (Fix with Cursor)
assert 405 == 416
 +  where 405 = HttpResponse(status_code:405, headers:{'Date': 'Mon, 27 Apr 2026 23:45:51 GMT', 'Server': 'Apache/2.4.66 (Ubuntu)', 'T...customer service team. Security provided by Datadog."}],"security_response_id":"f6e074ba-0ed0-4ed8-1bfd-0bf8b27b1d01"}).status_code
 +    where HttpResponse(status_code:405, headers:{'Date': 'Mon, 27 Apr 2026 23:45:51 GMT', 'Server': 'Apache/2.4.66 (Ubuntu)', 'T...customer service team. Security provided by Datadog."}],"security_response_id":"f6e074ba-0ed0-4ed8-1bfd-0bf8b27b1d01"}) = <tests.appsec.test_suspicious_attacker_blocking.Test_Suspicious_Attacker_Blocking object at 0x7faeb4620aa0>.response_4

self = <tests.appsec.test_suspicious_attacker_blocking.Test_Suspicious_Attacker_Blocking object at 0x7faeb4620aa0>

    def test_block_suspicious_attacker(self):
        # ASM disabled
        assert self.config_state_1.state == rc.ApplyState.ACKNOWLEDGED
        interfaces.library.assert_no_appsec_event(self.response_1)
...
View all

ℹ️ Info

No other issues found (see more)

❄️ No new flaky tests detected

Useful? React with 👍 / 👎

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

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