Skip to content

ref(typing): promote 229 modules to precise typing contracts - #129335

Closed
joshuarli wants to merge 1 commit into
getsentry:masterfrom
joshuarli:typing-hillclimb-upstream
Closed

joshuarli wants to merge 1 commit into
getsentry:masterfrom
joshuarli:typing-hillclimb-upstream

Conversation

@joshuarli

@joshuarli joshuarli commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

Types the serializer, endpoint, model, and integration surface with precise contracts (TypedDict responses, narrowed users, IO/QuerySet generics, Mapping over schemaless JSON) and graduates the covered modules out of the mypy weaklist, including narrowing the sentry.flags.endpoints.* wildcard to the two modules that still need leniency.

This branch was rebuilt on current master as an annotation-only change:

  • Excludes the campaign evaluator, its policy modules, the campaign log, and owner-owned baseline edits.
  • Preserves the ReleaseFile.save runtime contract (the earlier keyword-only signature change is dropped) and uses casts where the campaign had added fail-closed assertions, so runtime behavior is unchanged.
  • Fixes two refactor regressions: starred group search views keep createdBy/starred/stars, and Seer commit lookups stay keyed by primary key instead of sha.
  • Teaches the weaklist guard that narrowing a wildcard into named modules is not a new weaklist addition.

Behavioral changes are split into separate draft PRs (none stacked):

typing-hillclimb-campaign is the canonical integration branch, renamed from typing-hillclimb-upstream; this PR points at its rebuilt commit.

Verification on the rebuilt tree: mypy clean over all 249 changed Python files, ruff check/format clean over changed files, and focused pytest suites for release serialization, the starred search-view endpoint, Teams client, release files, Seer tools, options store, paginator, Jira search, apidocs extensions, Bitbucket client, and metrics query builder.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Oct 30, 2026
Rebuild the accepted typing campaign on current master as an
annotation-only change. Excludes the campaign evaluator, its policy
modules, the campaign log, and owner-owned baseline edits. Behavior
changes are carved into separate PRs; this commit preserves runtime
behavior, including ReleaseFile.save positional compatibility and the
release serializer's existing stats and newGroups output.

Fix two refactor regressions: starred group search views keep their
createdBy/starred/stars fields, and Seer commit lookups stay keyed by
primary key instead of sha.

Allow the weaklist guard to accept narrowing a wildcard into named
modules, which is how the flags endpoints wildcard graduates.
@joshuarli
joshuarli force-pushed the typing-hillclimb-upstream branch from eb7d115 to 0cafdc5 Compare October 31, 2026 16:52
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Oct 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@joshuarli

Copy link
Copy Markdown
Member Author

Superseded by #129431. GitHub keeps a fork PR pinned to its original head branch, so the rebuilt typing-hillclimb-campaign branch could not be retargeted in place.

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 Scope: Frontend Automatically applied to PRs that change frontend components Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant