-
Notifications
You must be signed in to change notification settings - Fork 10
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
feat: add dev container for consistent development environment #899
Conversation
- ensures consistent development setup - includes necessary dependencies and configurations - allows step-in for things like how container id is generated since the whole workspace is inside a container
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.
👍 LGTM, thanks for the nice addition :)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #899 +/- ##
==========================================
- Coverage 71.79% 71.78% -0.01%
==========================================
Files 328 328
Lines 48605 48605
==========================================
- Hits 34894 34893 -1
- Misses 13711 13712 +1
|
BenchmarksComparisonBenchmark execution time: 2025-02-26 13:42:13 Comparing candidate commit 4bdfc64 in PR branch Found 1 performance improvements and 0 performance regressions! Performance is the same for 51 metrics, 2 unstable metrics. scenario:concentrator/add_spans_to_concentrator
CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
BaselineOmitted due to size. |
// Use 'mounts' to make the cargo cache persistent in a Docker Volume. | ||
"mounts": [ | ||
{ | ||
"source": "devcontainer-cargo-cache-${devcontainerId}", |
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.
So what does this translate to? Is it using Docker cache
mounts underneath? I mean something like --mount=type=cache,target=/usr/local/cargo
, or is it specific to dev containers?
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.
you get a volume which is attached to dev container just like any other volume
docker volume ls | grep devcontainer-cargo-cache
local devcontainer-cargo-cache-1u4p07avg375gi7o172o2cfupr5iafgjj9t7hvog8dscsv7co5df
since it is container specific, running the same container would give you same volume and helps avoiding repetitive whole world of internet download.
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.
Ok, so it's manually maintaining what --mount=type=cache,...
gives you.
Do you know if it has a cached target
directory as well for the output of the build? I'm just curious.
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.
I didn't try but I think you can as per spec https://github.com/devcontainers/spec/blob/main/schemas/devContainer.base.schema.json#L711C8-L711C12
you can bring your own arbitrary location if this is what you mean.
What does this PR do?
I went with minimal setup and targeting only one OS, but this can be extended with multiple container (debian, alpine etc)
Motivation
I have been using it locally by keeping in my stashes, but this is general problem since we are all (or almost) on osx and want to test and debug how the libraries behave on linux.
Additional Notes
none.
How to test the change?
Follow the readme.