Skip to content

feat(derived): Add basic gating helpers - #122616

Merged
kcons merged 4 commits into
masterfrom
kcons/gateit
Aug 26, 2026
Merged

feat(derived): Add basic gating helpers#122616
kcons merged 4 commits into
masterfrom
kcons/gateit

Conversation

@kcons

@kcons kcons commented Aug 25, 2026

Copy link
Copy Markdown
Member

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.

@kcons
kcons requested a review from cvxluo August 25, 2026 17:39
@kcons
kcons requested review from a team as code owners August 25, 2026 17:39
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Aug 25, 2026
Comment on lines +11 to +19
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

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.

although these tests do make sense in context, i do feel like they're just testing our options system

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

yeah, it's a bit silly.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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.

@kcons

kcons commented Aug 26, 2026

Copy link
Copy Markdown
Member Author

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.

@kcons
kcons enabled auto-merge (squash) August 26, 2026 16:56
@kcons
kcons merged commit 87721b4 into master Aug 26, 2026
88 checks passed
@kcons
kcons deleted the kcons/gateit branch August 26, 2026 17:20
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.

3 participants