Skip to content

[nodejs] allow mounting local dd-trace-js as weblog volume#2777

Merged
rochdev merged 25 commits intomainfrom
rochdev/nodejs-local-weblog
Aug 5, 2024
Merged

[nodejs] allow mounting local dd-trace-js as weblog volume#2777
rochdev merged 25 commits intomainfrom
rochdev/nodejs-local-weblog

Conversation

@rochdev
Copy link
Copy Markdown
Member

@rochdev rochdev commented Jul 19, 2024

Motivation

Right now we have to npm pack the local code, copy the resulting archive to system-tests/binaries, and rebuild weblog for every single code change before we can rerun the tests.

By allowing to instead mount the local dd-trace-js folder as a volume on the container, we can simply rerun the tests on code changes without having to go through any of the above.

Changes

Allow mounting local dd-trace-js as weblog volume.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner. We're working on refining the codeowners file quickly.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

🚀 Once your PR is reviewed, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • A docker base image is modified?
    • the relevant build-XXX-image label is present
  • A scenario is added (or removed)?

@rochdev rochdev marked this pull request as ready for review July 19, 2024 03:38
@rochdev rochdev requested review from a team as code owners July 19, 2024 03:38
Copy link
Copy Markdown
Collaborator

@robertomonteromiguel robertomonteromiguel left a comment

Choose a reason for hiding this comment

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

I like the idea of assembling the volumes, but I also wonder how much we gain. I mean looking for the balance of keeping the code easy to read, its complexity and homogeneity (we run apps in different languages).

Comment thread docs/scenarios/parametric.md
Comment thread docs/scenarios/parametric.md Outdated
Comment thread utils/_context/containers.py Outdated
Comment thread utils/build/docker/nodejs/app.sh
Comment thread utils/build/docker/nodejs/install_ddtrace.sh Outdated
Comment thread utils/build/docker/nodejs/parametric/package.json
Comment thread utils/build/docker/nodejs/express4-typescript.Dockerfile
@rochdev
Copy link
Copy Markdown
Member Author

rochdev commented Jul 19, 2024

I like the idea of assembling the volumes, but I also wonder how much we gain. I mean looking for the balance of keeping the code easy to read, its complexity and homogeneity (we run apps in different languages).

This is by far the biggest pain point of working with system tests (except for them being slow), so I'd say it's warranted especially since it doesn't really increase complexity all that much. As for homogeneity, I would agree but only in the sense that this should also be done for other languages if possible, although this is out of scope of this first PR.

@rochdev rochdev dismissed robertomonteromiguel’s stale review July 19, 2024 13:55

I addressed his comments and he just went on vacation for a month

@cbeauchesne
Copy link
Copy Markdown
Collaborator

I addressed his comments and he just went on vacation for a month

Don't worry, he just sent me all his pending reviews.

Comment thread utils/build/docker/nodejs/app.sh
Comment thread utils/build/docker/nodejs/app.sh
Comment thread utils/build/docker/nodejs/install_ddtrace.sh Outdated
@rochdev rochdev force-pushed the rochdev/nodejs-local-weblog branch from 7936b2b to 9a170ea Compare July 24, 2024 18:30
Comment thread utils/_context/containers.py Outdated
Comment thread docs/scenarios/parametric.md
Comment thread utils/_context/_scenarios/parametric.py Outdated
Comment thread utils/_context/containers.py Outdated
Comment thread utils/_context/containers.py Outdated
Comment thread utils/build/docker/nodejs/express4-typescript/app.ts Outdated
Comment thread utils/build/docker/nodejs/express4/.npmrc
Comment thread utils/build/docker/nodejs/express4/app.js
Comment thread docs/execute/binaries.md Outdated
@rochdev rochdev force-pushed the rochdev/nodejs-local-weblog branch from af48ad0 to 84cb275 Compare August 1, 2024 00:10
@rochdev
Copy link
Copy Markdown
Member Author

rochdev commented Aug 1, 2024

It looks like the CI failure is also happening on other branches and so it's unrelated to this PR.

Comment thread utils/build/docker/nodejs/nextjs/next.config.js
Comment thread utils/build/docker/nodejs/express4/app.js Outdated
Comment thread utils/build/docker/nodejs/parametric/.npmrc
@rochdev rochdev force-pushed the rochdev/nodejs-local-weblog branch from fda1b95 to 60cb2bb Compare August 1, 2024 16:55
Copy link
Copy Markdown
Member

@simon-id simon-id left a comment

Choose a reason for hiding this comment

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

Don't know much about the python internals but otherwise LGTM

@rochdev
Copy link
Copy Markdown
Member Author

rochdev commented Aug 2, 2024

@cbeauchesne PR is ready for one last look!

Copy link
Copy Markdown
Collaborator

@cbeauchesne cbeauchesne left a comment

Choose a reason for hiding this comment

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

All good, thank you for tackling this.

@rochdev rochdev merged commit 09e9f71 into main Aug 5, 2024
@rochdev rochdev deleted the rochdev/nodejs-local-weblog branch August 5, 2024 17:53
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.

5 participants