Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish images based on ghcr.io/datadog/images-rb/engines/ruby with node and npm installed #28

Open
cbeauchesne opened this issue Nov 20, 2024 · 6 comments

Comments

@cbeauchesne
Copy link

DataDog/system-tests uses ghcr.io/datadog/images-rb/engines/ruby images as base images to build weblog images.

To build them, node and npm are required, and are installed with apt. With those deps pre-installed in a base image, not only the build step will be faster, but we won't need any call to apt, reducing the flake probability of the build step.

@TonyCTHsu
Copy link
Contributor

TonyCTHsu commented Nov 20, 2024

I supposed the reason those applications require node and npm. Is because they are running as a full stack web application.

Would it be feasible that we made those application as API server which does not require node or npm. cc @vpellan

@cbeauchesne
Copy link
Author

I supposed the reason those applications require node and npm. Is because they are running as a full stack web application.

yes

Would it be feasible that we made those application as API server which does not require node or npm

The exact purpose of those apps is to simulate what would be ou customer rails HTTP app. Is it possible to have the a rails app without node ?

@vpellan
Copy link

vpellan commented Nov 20, 2024

The exact purpose of those apps is to simulate what would be ou customer rails HTTP app. Is it possible to have the a rails app without node ?

I believe so, as only Rails 6.0 and Rails 6.1 seems to use Node and npm. As to why, I'm not sure, but these weblogs needs a lot of cleaning (which I plan to do during the next code freeze)

@TonyCTHsu
Copy link
Contributor

Is it possible to have the a rails app without node ?

Yes, you can provide --api flag to the generator, this would configure Rails a API server (removing all the frontend stuff, which our Ruby code does not interact with).

dd-trace-rb master % docker run --rm -it ruby:3.3 bash
root@7770bbb62624:/# gem -v
3.5.22
root@7770bbb62624:/# gem exec -g rails rails new weblog --api --minimal -GMOCAJT

Even with this minimal setup, it still contains lots unnecessary parts can be removed for system tests scenarios

@cbeauchesne
Copy link
Author

this would configure Rails a API server

Ah, i understand now your first comment. Yes, it would definitly be better

@lloeki
Copy link
Contributor

lloeki commented Nov 27, 2024

only Rails 6.0 and Rails 6.1 seems to use Node and npm. As to why, I'm not sure

Asset management pipeline via webpack{,er}.

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

No branches or pull requests

4 participants