ref(project-cache): Check revision before loading from Redis #3892
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checks the 'new' revision key before actually loading and parsing the project config.
Revision introduced here: getsentry/sentry#75523
Change is backwards compatible, if the key is missing the check is simply skipped.
I was considering propagating the information whether something was refreshed or a fresh fetch through the state channel, but after review and consideration, I don't think that is useful information, we still have to reset a bunch of internal state and move the project out of the
in flight
status. All if which we already do, the only thing we could change is skipping the assignment of the project info contained in the project fetch state (because that's the same state as the old), but this is already only anArc
.Still needs:
Disabled states also need to remember their revision. Maybe we skip this, since disabled states are generally very small and quick, but for consistency sake it should be there.Disabled states don't have a revision currently, they currently have no metadata and are just{"disabled": true}
. In a followup we can think about introducing a revision for disabled states as well (or checking before & after for disabled).Integration tests!#skip-changelog