Title: fix(test): [Queue Instrumentation 39] Remove stale Kafka container before startup by adinauer · Pull Request #5347 · getsentry/sentry-java · GitHub
Open Graph Title: fix(test): [Queue Instrumentation 39] Remove stale Kafka container before startup by adinauer · Pull Request #5347 · getsentry/sentry-java
X Title: fix(test): [Queue Instrumentation 39] Remove stale Kafka container before startup by adinauer · Pull Request #5347 · getsentry/sentry-java
Description: PR Stack (Queue Instrumentation) #5249 #5250 #5253 #5254 #5255 #5259 #5260 #5265 #5274 #5279 #5280 #5281 #5282 #5283 #5288 #5289 #5291 #5312 #5313 #5314 #5315 #5316 #5318 #5319 #5320 #5321 #5322 #5323 #5324 #5325 #5327 #5328 #5330 #5337 #5338 #5341 #5343 #5345 #5347 #5348 #5352 #5368 📜 Description Clean up stale Kafka system-test containers before starting the local broker. SystemTestRunner.start_kafka_broker() now force-removes the named container up front, even when the current runner instance did not start the previous broker. stop_kafka_broker() stays ownership-aware and still only tears down brokers started by the current run. 💡 Motivation and Context A review comment on the original Kafka console sample PR pointed out that interrupted runs could leave behind a stopped container named sentry-java-system-test-kafka. The runner tried to clean that up before startup, but the cleanup path returned early whenever kafka_started_by_runner was false, so the next docker run --name ... failed with a container-name conflict. This change fixes the stale-container path without changing the reuse behavior for an already running broker on localhost:9092. I also looked into replacing Redpanda with the official Apache Kafka image. That is possible, but it is not a drop-in swap because the current startup command is Redpanda-specific, so I left that as a separate follow-up. 💚 How did you test it? Ran ./gradlew spotlessApply apiDump Ran python3 -m py_compile test/system-test-runner.py Ran a mocked Python verification that start_kafka_broker() now issues docker rm -f sentry-java-system-test-kafka before docker run 📝 Checklist I added GH Issue ID & Linear ID I added tests to verify the changes. No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled. I updated the docs if needed. I updated the wizard if needed. Review from the native team if needed. No breaking change or entry added to the changelog. No breaking change for hybrid SDKs or communicated to hybrid SDKs. 🔮 Next steps If we want the most official broker image for these tests, switch the runner to apache/kafka in a separate PR. #skip-changelog ⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.
Open Graph Description: PR Stack (Queue Instrumentation) #5249 #5250 #5253 #5254 #5255 #5259 #5260 #5265 #5274 #5279 #5280 #5281 #5282 #5283 #5288 #5289 #5291 #5312 #5313 #5314 #5315 #5316 #5318 #5319 #5320 #5321 #5322 #...
X Description: PR Stack (Queue Instrumentation) #5249 #5250 #5253 #5254 #5255 #5259 #5260 #5265 #5274 #5279 #5280 #5281 #5282 #5283 #5288 #5289 #5291 #5312 #5313 #5314 #5315 #5316 #5318 #5319 #5320 #5321 #5322 #...
Opengraph URL: https://github.com/getsentry/sentry-java/pull/5347
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b74c5b21-a62b-7a45-cbbe-05415ac874d8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8776:133E28:5E2DBE:84834A:6B047838 |
| html-safe-nonce | b8c520b84fc0b8d8990aec0f4a8604f87176dcde9b4a51beff5f5b10e1dd7e32 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Nzc2OjEzM0UyODo1RTJEQkU6ODQ4MzRBOjZCMDQ3ODM4IiwidmlzaXRvcl9pZCI6IjU1NDI2NDI5NzA3MjczMTU1MTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fee2f182e5a9c7ab3d86ef13180d409b867f3c890176d28e70934d6892f80fdf |
| hovercard-subject-tag | pull_request:3600570766 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/getsentry/sentry-java/pull/5347/files |
| twitter:image | https://avatars.githubusercontent.com/u/2542832?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/2542832?s=400&v=4 |
| og:image:alt | PR Stack (Queue Instrumentation) #5249 #5250 #5253 #5254 #5255 #5259 #5260 #5265 #5274 #5279 #5280 #5281 #5282 #5283 #5288 #5289 #5291 #5312 #5313 #5314 #5315 #5316 #5318 #5319 #5320 #5321 #5322 #... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9c099f1b85def81ca352464c276510dfef32deaf3c305404e65b8d270284a58b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/getsentry/sentry-java git https://github.com/getsentry/sentry-java.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 3368190 |
| octolytics-dimension-repository_nwo | getsentry/sentry-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 3368190 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | cf73f57448d52b3a7b619195e182b33d3b3454ca |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width