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

Allow spinning a Memray environment up in codespaces #582

Merged
merged 4 commits into from May 20, 2024

Conversation

godlygeek
Copy link
Contributor

Update our Dockerfile to the latest Debian stable, and add a devcontainer.json based on it, with our build and test dependencies installed.

@godlygeek godlygeek self-assigned this Apr 20, 2024
@godlygeek godlygeek force-pushed the codespaces branch 2 times, most recently from 76489cc to 3983a40 Compare April 20, 2024 05:08
@codecov-commenter
Copy link

codecov-commenter commented Apr 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.86%. Comparing base (41248ed) to head (b134158).
Report is 42 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #582      +/-   ##
==========================================
+ Coverage   92.55%   92.86%   +0.30%     
==========================================
  Files          91       92       +1     
  Lines       11304    11234      -70     
  Branches     1581     2055     +474     
==========================================
- Hits        10462    10432      -30     
+ Misses        837      802      -35     
+ Partials        5        0       -5     
Flag Coverage Δ
cpp 92.86% <ø> (+6.92%) ⬆️
python_and_cython 92.86% <ø> (-2.86%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@godlygeek godlygeek force-pushed the codespaces branch 3 times, most recently from fbf6c56 to 5762da4 Compare April 20, 2024 16:39
@jcarnaxide
Copy link
Contributor

First comment I would like to add, spinning up the codespace took ~7 minutes. This is likely due to all the dependencies required for this currently considered codespace. This makes me wonder if a slimmed down version of this codespace might make sense for folks attempting to follow the tutorial (and not necessarily needing all of the dependencies)

I want to be clear, my suggestion is not to modify this codespace, it probably makes sense to leave this one as is, just some food for thought if we want to potentially shrink the time to create a codespace for folks. Then again, 7 minutes is not too long, so maybe optimization is overkill.

Just food for thought 😄

@pablogsal
Copy link
Member

Do we know where these 7 minute are being spent? The dependencies are not that many so I am a bit surprised

@godlygeek
Copy link
Contributor Author

I timed it at 5 minutes. https://gist.github.com/godlygeek/cc5bfd9e64da8b4c5f24178e735745cc shows the log. 3.5 minutes of that is installing the DPKG dependencies, most of which seemed to be spent installing nodejs and its deps, 0.5 minutes is setting up our virtualenv and installing our build and test deps, and 1 minute is building Memray from source, give or take a bit of rounding.

This makes for faster builds and better stack traces, and a better
debugging experience.

Signed-off-by: Matt Wozniski <[email protected]>
We missed updating this list of build dependencies when we began to use
`pkgconfig`.

Signed-off-by: Matt Wozniski <[email protected]>
Symlinking `ccache` from `/usr/bin` into `/bin` no longer works, because
`/bin` is now a symlink to `/usr/bin`, but Debian creates `ccache`
symlinks for installed compilers automatically. We just need to put them
in our `PATH` to use them.

Signed-off-by: Matt Wozniski <[email protected]>
This gives codespaces users an environment that can build Memray and run
our tests.

See https://aka.ms/devcontainer.json for format details.
See https://containers.dev/implementors/json_reference/ for options.

Signed-off-by: Matt Wozniski <[email protected]>
@godlygeek
Copy link
Contributor Author

@gusmonod Give this PR an approval, if you wouldn't mind!

@godlygeek godlygeek merged commit 9822c09 into bloomberg:main May 20, 2024
18 checks passed
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.

None yet

5 participants