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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

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 (1203a5a).

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
This enables using top-level dir as a place to run
rake tasks etc. too without warnings about duped
gems in Gemfiles.
@solnic solnic force-pushed the e2e-test-setup branch 2 times, most recently from 7037553 to 269df71 Compare August 5, 2025 06:02
@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.

},
define: {
__RAILS_API_URL__: JSON.stringify(process.env.SENTRY_E2E_RAILS_APP_URL || 'http://localhost:4000')
}
Copy link

Choose a reason for hiding this comment

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

Bug: Vite Environment Variable Prefix Issue

The Svelte app uses import.meta.env.SENTRY_DSN_JS, but this environment variable is not exposed to client-side code by Vite. Vite only exposes variables prefixed with VITE_ by default, causing the Sentry DSN to be undefined. This can be fixed by renaming the variable to VITE_SENTRY_DSN_JS or explicitly defining it in vite.config.js.

Additional Locations (1)
Fix in Cursor Fix in Web

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.

1 participant