Repository navigation
Conversation
DashboardWidget.widget_type is nullable. Before #129614 a widget with no type fell through the config lookup and was skipped like any other unsupported type. #129614 added `assert widget.widget_type is not None` to satisfy the dict[int, ...] lookup, so a null-type widget now raises AssertionError and aborts the whole unfurl batch for that message. Narrow with an explicit skip instead, and in build_widget_timeseries_params raise the existing "Unsupported widget type" ValueError for a null type rather than an AssertionError.
joshuarli
force-pushed
the
josh/typing-contracts/b1-slack-null-widget-type
branch
from
November 12, 2026 19:02
d75037a to
d577989
Compare
joshuarli
marked this pull request as ready for review
November 12, 2026 19:08
Member
Author
joshuarli
added a commit
that referenced
this pull request
Nov 26, 2026
…type Consolidates the previously separate drafts #129616, #129619 and #129704 into one review unit; the code is unchanged from those individually validated drafts. - msteams requires the conversation id in the API response - jira and jira_server require a query before calling the client - slack unfurl skips dashboard widgets with no widget type instead of asserting Integrated in #130956.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Slack unfurls of dashboard widget links skip a widget whose
widget_typeis null again, instead of raisingAssertionError.DashboardWidget.widget_typeis nullable. Before #129614, a null type missed the_WIDGET_TYPE_TO_CONFIGlookup and was skipped like any other unsupported type. #129614 addedassert widget.widget_type is not Noneto satisfy thedict[int, ...]key type, which turned that skip into an exception. The exception aborts every link in the same unfurl batch. The narrowing is now an explicitcontinue.build_widget_timeseries_paramshad the same assert, and it now raises its existingValueError("Unsupported widget type")for a null type.Behavior change: restores the behavior from before #129614. A null-type widget is skipped during unfurl rather than failing it, and
build_widget_timeseries_paramsraisesValueErrorinstead ofAssertionErrorfor one.test_unfurl_dashboards_null_widget_type_is_skippedfails onmasterwithAssertionError. It shares its body with the existing unsupported-type skip test.