-
Notifications
You must be signed in to change notification settings - Fork 219
Add Lab to quickstart #678
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
Conversation
What's the impact on image size and container memory and cpu usage? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉🥳🎉🥳🎉🥳🎉🥳🎉🥳
@@ -26,6 +27,7 @@ export PGPORT=5432 | |||
: "${ENABLE_LOGS:=false}" | |||
: "${ENABLE_CORE:=false}" | |||
: "${ENABLE_HORIZON:=false}" | |||
: "${ENABLE_LAB:=false}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we remove the enable lab env and instead rely on the enable env var? The other ones for core and horizon are legacy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the env can stay, but can we hook it into the ENABLE car as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment was marked as resolved, but enabling lab was not hooked into the ENABLE
variable.
To do that you need to add a block that looks something like this to where the blocks like that exist already in this file:
if [[ ",$ENABLE," = *",lab,"* ]]; then
ENABLE_LAB=true
fi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leighmcculloch Unfortunately, is node.js tire fire all around. $ du -hs /stellar/lab/node_modules/
786M /stellar/lab/node_modules/
$ du -hs /stellar/lab/build/
314M /stellar/lab/build/ As for memory and cpu, it should be fine. $ ps auxwww | grep next
stellar 619 0.1 0.3 22331024 125484 pts/0 Sl 01:52 0:01 next-server (v14.2.26) |
Oof. I think we should make changes to Lab if needed to make it generatable as a static website. An additional 1GB of image size is multiple times the current size of the image. |
we do have AHA waiting on this for scaffold-stellar. I think we should get this merged in and unblock them. while we get an optimization to reduce the image size |
616aae2
to
428241f
Compare
c0fab9a
to
8cede7f
Compare
8cede7f
to
a28757e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new Lab component to the quickstart, enabling the Stellar Laboratory service to be built, deployed, and run alongside the existing services.
- Introduces environment variables and startup configuration for the Lab service.
- Adds a dedicated Dockerfile for the Lab image and updates the build, Makefile, and supervisor configurations accordingly.
- Updates GitHub workflows to cache, build, and load the Lab image.
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
start | Added environment variable and service start block for Lab. |
common/supervisor/etc/supervisord.conf.d/stellar-lab.conf | Created supervisor configuration for the Lab process. |
common/nginx/etc/conf.d/lab.conf | Added NGINX proxy configuration for Lab. |
Makefile | Added LAB_REF variable and build-deps target for Lab. |
Dockerfile.lab | New Dockerfile for building the Lab image. |
Dockerfile | Updated to include the Lab stage and copy Lab assets and binaries. |
.github/workflows/* | Updated workflows to include build, cache, and loading steps for Lab. |
Comments suppressed due to low confidence (3)
Makefile:81
- [nitpick] Consider adding a comment to document the use of NEXT_PUBLIC_COMMIT_HASH in the Lab build target to assist future maintainers in understanding its purpose.
build-deps-lab:
.github/workflows/build.yml:324
- The disk cleanup commands remove several system directories with sudo; please confirm these removals are safe within the CI environment and won’t affect subsequent steps.
sudo rm -rf /usr/share/dotnet
Dockerfile:37
- [nitpick] Ensure that the permissions and paths of the Node.js binaries being copied from the Lab stage match the expected environment requirements to avoid runtime issues.
COPY --from=lab /usr/local/bin/node \
2f9a208
to
e24b36b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fnando Couple asks inline, can you follow up w ith?
RUN git fetch origin ${NEXT_PUBLIC_COMMIT_HASH} | ||
RUN git checkout ${NEXT_PUBLIC_COMMIT_HASH} | ||
RUN rm -rf .git | ||
RUN yarn install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yarn install
is not guaranteed to be reproducible. We need to add the --frozen-lockfile
option to ensure it is. Can we do that here to make sure that we never build dependencies into the quickstart image that haven't been tested and run through the normal test processes of lab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -26,6 +27,7 @@ export PGPORT=5432 | |||
: "${ENABLE_LOGS:=false}" | |||
: "${ENABLE_CORE:=false}" | |||
: "${ENABLE_HORIZON:=false}" | |||
: "${ENABLE_LAB:=false}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment was marked as resolved, but enabling lab was not hooked into the ENABLE
variable.
To do that you need to add a block that looks something like this to where the blocks like that exist already in this file:
if [[ ",$ENABLE," = *",lab,"* ]]; then
ENABLE_LAB=true
fi
No description provided.