Skip to content

chore(repo): improve the devcontainer setup #27221

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

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

tinesoft
Copy link
Contributor

  • respect pnpm version declared in root package.json
  • improve performances when installing node modules
  • add troubleshooting instructions in CONTRIBUTING.md to help solve common issue related to outdated GLIBC version

Copy link

vercel bot commented Jul 31, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Aug 10, 2024 5:21am

@tinesoft tinesoft force-pushed the chore/devcontainer branch 3 times, most recently from ee9fe67 to 9648096 Compare August 1, 2024 02:29
@isaacplmann
Copy link
Collaborator

I'll let Jason or Victor approve the changes. The docs look fine.

How often does the version of glibc get updated? Is there a way to automatically use the latest version?

@tinesoft
Copy link
Contributor Author

tinesoft commented Aug 1, 2024

From what I have understood, GLIBC is used to compile native stuff used by Nx ( i.e rust related code), so I would say that the version of the compiler library need to evolve along with the version of rust Rust language and features that are used in the project.

When I initially setup the devcontainer, v2.31 of GLIBC was needed, now it is v2.33 at minimum

@tinesoft
Copy link
Contributor Author

tinesoft commented Aug 1, 2024

also I think the sudo apt-get update performed whenever the devcontainer is created (see postCreateCommand.sh) will take care of automatically updating the glibc binaries, but that would only be for minor/fix versions (this has already worked before when I first created the devcontainer setup)

As for automating the entire thing starting from the base image that is used by the devcontainer, maybe we can create a small script that would extract it and run the underlying docker command to build/mount the container and then nx build command as part of an e2e nightly test...

That way we can spot when the image needs to be updated.

I can look into that and provide another PR if the idea is validated?

@tinesoft tinesoft force-pushed the chore/devcontainer branch 4 times, most recently from cb520a3 to 509ccb4 Compare August 9, 2024 14:39
@tinesoft
Copy link
Contributor Author

tinesoft commented Aug 9, 2024

Any progress on reviewing this ? @FrozenPandaz @vsavkin

@AgentEnder AgentEnder assigned isaacplmann and unassigned AgentEnder Aug 10, 2024
- respect `pnpm` version declared in root `package.json`
- improve disk performances when installing node modules
- add troubleshooting instructions in `CONTRIBUTING.md` to help solve common issue related to outdated `GLIBC` version
- add port forwarding for `verdaccio` to allow quickly inspecting the packages install in verdaccio local registry
@tinesoft tinesoft force-pushed the chore/devcontainer branch from 24977b3 to 3dd72fb Compare August 10, 2024 05:19
@AgentEnder AgentEnder merged commit 8bba5b5 into nrwl:master Aug 12, 2024
6 checks passed
@tinesoft
Copy link
Contributor Author

tinesoft commented Aug 12, 2024

Thanks for approving/merging this.

Another thing that we can do, to optimize/improve the DX when opening the repo in Github Codespaces, is to activate the pre-built image of the underlying devcontainer, so that future contributors can get started more quickly (no need to wait for the initial build of image)

image

Then
image

@tinesoft
Copy link
Contributor Author

Isaac: How often does the version of glibc get updated? Is there a way to automatically use the latest version?

@isaacplmann do you want me to investigate how to automate the update of the devcontainer image as described here ?

@isaacplmann
Copy link
Collaborator

I wouldn't worry about doing that right now. If it is automatically handling patch and minor versions, we can manually handle major versions.

@tinesoft tinesoft deleted the chore/devcontainer branch August 12, 2024 13:40
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants