Skip to content

ref(workflow_engine): Use CacheMapping for release condition caches - #126532

Merged
kcons merged 2 commits into
masterfrom
ref/workflow-engine-release-cache-mapping
Oct 6, 2026
Merged

kcons merged 2 commits into
masterfrom
ref/workflow-engine-release-cache-mapping

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

The latest-release, latest-adopted-release, and first/last-release caches now each have one CacheMapping in utils/releases.py. Before this, latest_release_handler.py defined its own mappings on top of string key helpers from releases.py, while the signal handlers that clear the cache called raw cache.delete* on those same helper strings. Now reads, writes, and invalidation all go through the same mapping, so their keys can't drift apart.

  • get_first_last_release_for_event now reads and writes through first_last_release_cache. A cached negative lookup now returns None instead of leaking False to the caller.
  • latest_release_handler.py imports the shared mappings and key types instead of defining its own.
  • I removed the get_*_cache_key string helpers, and the tests now use the mappings directly.

The cache key strings and the 600s TTL are the same as before, so existing cache entries stay valid through the deploy.

via Kyle Consalus.

--

View Junior Session [Sentry]

Co-Authored-By: Kyle Consalus <kyle.consalus@sentry.io>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 6, 2026
@kcons
kcons marked this pull request as ready for review October 6, 2026 00:11
@kcons
kcons requested a review from a team as a code owner October 6, 2026 00:11
@kcons

kcons commented Oct 6, 2026

Copy link
Copy Markdown
Member

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f98e5b9. Configure here.

@kcons
kcons requested review from a team and RudraPatel2003 October 6, 2026 16:14
@kcons
kcons merged commit 70d344b into master Oct 6, 2026
88 checks passed
@kcons
kcons deleted the ref/workflow-engine-release-cache-mapping branch October 6, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants