feat(derived): Add basic gating helpers - #122616
Conversation
| def test_true(self) -> None: | ||
| self.project.update_option(GROUP_ACTION_LOG_BACKFILL_COMPLETED_OPTION, True) | ||
|
|
||
| assert is_backfilled(self.project) is True | ||
|
|
||
| def test_false(self) -> None: | ||
| self.project.update_option(GROUP_ACTION_LOG_BACKFILL_COMPLETED_OPTION, False) | ||
|
|
||
| assert is_backfilled(self.project) is False |
There was a problem hiding this comment.
although these tests do make sense in context, i do feel like they're just testing our options system
There was a problem hiding this comment.
ended up just deleting them. Like 8s of testing largely for conceptual reasons didn't seem worth it.
we can add it later if the logic gets non-trivial.
|
|
||
| It may still be wrong, but checking it and surfacing it should be reasonable. | ||
| """ | ||
| return features.has("projects:issue-action-log-write-to-db", project) and is_backfilled(project) |
There was a problem hiding this comment.
might be too much, but could catch like pending recalculations and check for the pipeline getting reset right? but that might give this check too much look into the internal mechanism
There was a problem hiding this comment.
That's true, but the checking code should handle that. This iteration doesn't exactly, but the background checking does, and I'm expanding on the read-time checking to be smarter in a follow-up to this.
This is just aimed at distinguishing the pre-backfill, known incomplete cases from cases worth trying to validate.
|
Also added a killswitch just because I'm a little paranoid about group_details having issues, this behavior is 100% non-essential, and I intend to add to it. Plus, killswitches are cheap, and if it collects dust it's easy enough to remove. |
Add a module with gating helpers, largely to codify current gating practices.
Use this helper to extend our read-time status validation.
Follow-up is planned to use the "should be correct" to do bulk background status validation to get a better sense of our inconsistency with history.