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

feat: Add AppContextWeak to prevent reference cycles #529

Merged
merged 3 commits into from
Dec 6, 2024

Conversation

spencewenski
Copy link
Member

@spencewenski spencewenski commented Dec 6, 2024

This is useful for preventing reference cycles between things that are held in the AppContext and also need a reference to the AppContext; for example, HealthChecks.

Closes #526

This is useful for preventing reference cycles between things
that are held in the `AppContext` and also need a reference to
the `AppContext`; for example, `HealthCheck`s.
Copy link

codecov bot commented Dec 6, 2024

Codecov Report

Attention: Patch coverage is 43.75000% with 36 lines in your changes missing coverage. Please review.

Project coverage is 40.54%. Comparing base (ef4508b) to head (04a7260).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/health_check/mod.rs 0.00% 11 Missing ⚠️
src/health_check/sidekiq_fetch.rs 28.57% 10 Missing ⚠️
src/health_check/database.rs 44.44% 5 Missing ⚠️
src/health_check/email/smtp.rs 44.44% 5 Missing ⚠️
src/health_check/sidekiq_enqueue.rs 44.44% 5 Missing ⚠️
Files with missing lines Coverage Δ
src/app/context.rs 14.33% <100.00%> (+2.52%) ⬆️
src/health_check/default.rs 100.00% <100.00%> (ø)
src/health_check/database.rs 70.83% <44.44%> (-11.52%) ⬇️
src/health_check/email/smtp.rs 63.15% <44.44%> (-11.85%) ⬇️
src/health_check/sidekiq_enqueue.rs 70.83% <44.44%> (-11.52%) ⬇️
src/health_check/sidekiq_fetch.rs 60.00% <28.57%> (-2.50%) ⬇️
src/health_check/mod.rs 4.76% <0.00%> (-5.24%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ef4508b...04a7260. Read the comment docs.

@spencewenski spencewenski merged commit 33e8e65 into main Dec 6, 2024
20 checks passed
@spencewenski spencewenski deleted the gh-526-weak-app-context branch December 6, 2024 22:34
@github-actions github-actions bot mentioned this pull request Dec 7, 2024
spencewenski pushed a commit that referenced this pull request Dec 7, 2024
## 🤖 New release
* `roadster`: 0.6.21 -> 0.6.22 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.6.22](roadster-v0.6.21...roadster-v0.6.22)
- 2024-12-07

### Added

- Add `AppContextWeak` to prevent reference cycles
([#529](#529))
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Use Arc weak in health check instances
1 participant