Skip to content

Improved devcontainer setup with e2e test mini infra #2672

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 13 commits into from
Aug 12, 2025
Merged

Conversation

solnic
Copy link
Collaborator

@solnic solnic commented Aug 1, 2025

This reworks our devcontainer setup so that it uses pre-built base images grabbed from ghcr.io and enables running e2e tests easily both on CI and locally.

There's a top level setup now in the root dir under spec where we can write high-level cross-gem e2e tests.

This is a solid foundation for building even more conveniences around development/debugging/testing in the future 🙂

To run e2e tests locally you can simply do:

cd .devcontainer
docker compose run --rm sentry-test bundle exec rake

#skip-changelog

Copy link

codecov bot commented Aug 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.41%. Comparing base (162ca86) to head (d2d8608).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2672      +/-   ##
==========================================
+ Coverage   97.39%   97.41%   +0.01%     
==========================================
  Files         135      135              
  Lines        5229     5229              
==========================================
+ Hits         5093     5094       +1     
+ Misses        136      135       -1     
Components Coverage Δ
sentry-ruby 97.74% <ø> (ø)
sentry-rails 96.10% <ø> (+0.14%) ⬆️
sentry-sidekiq 96.57% <ø> (ø)
sentry-resque 94.44% <ø> (ø)
sentry-delayed_job 94.68% <ø> (ø)
sentry-opentelemetry 99.31% <ø> (ø)
see 1 file with indirect coverage changes
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@solnic solnic force-pushed the e2e-test-setup branch 24 times, most recently from 9c29d73 to 1830579 Compare August 4, 2025 20:51
@solnic solnic force-pushed the e2e-test-setup branch 3 times, most recently from 76a9bbf to e4724c2 Compare August 4, 2025 21:32
@solnic solnic requested a review from sl0thentr0py August 5, 2025 06:19
@solnic solnic marked this pull request as ready for review August 5, 2025 06:19
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@sl0thentr0py
Copy link
Member

I tried running it on mac and linux both, neither works. We need to make this work without vscode since I do not use it.

On linux, the error is

[+] Running 1/1
 ✔ Container devcontainer-sentry-test-services-1  Started                                                     0.2s 
🚀 Running setup for service: test
🧹 Cleaning up .ruby-lsp directories...
📦 Installing bundle dependencies for workspace folders...
   Installing dependencies for /workspace/sentry/....
Bundler 2.6.9 is running, but your lockfile was generated with 2.2.33. Installing Bundler 2.2.33 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.2.33
Installing bundler 2.2.33
/usr/local/bin/bundle:25:in 'Kernel#load': cannot load such file -- /workspace/sentry/vendor/gems/3.4.5/gems/bundler-2.2.33/exe/bundle (LoadError)
	from /usr/local/bin/bundle:25:in '<main>'
❌ Bundle install failed for .
❌ Setup failed for service: test

Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just some questions and it does not work for me, will wait for fixes/instructions and continue then

cursor[bot]

This comment was marked as outdated.

@solnic
Copy link
Collaborator Author

solnic commented Aug 12, 2025

I tried running it on mac and linux both, neither works. We need to make this work without vscode since I do not use it.

On linux, the error is

@sl0thentr0py please try again:

git pull --rebase
cd .devcontainer
docker compose down -v
docker compose run --rm sentry-test bundle exec rake

cursor[bot]

This comment was marked as outdated.

@solnic solnic requested a review from sl0thentr0py August 12, 2025 10:15
@getsentry getsentry deleted a comment from cursor bot Aug 12, 2025
Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very nice, shipit

@solnic solnic merged commit 727bf14 into master Aug 12, 2025
139 of 141 checks passed
@solnic solnic deleted the e2e-test-setup branch August 12, 2025 15:17
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.

2 participants