Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(projects): use unusedFeatures in more places #82065

Merged
merged 3 commits into from
Dec 13, 2024
Merged

Conversation

JoshFerge
Copy link
Member

@JoshFerge JoshFerge commented Dec 12, 2024

use the ununusedFeatures collapse parameter in more places. see some slowness due to teams serializer having to render all of the project feature flags.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 12, 2024
@JoshFerge JoshFerge requested a review from a team December 12, 2024 23:28
@JoshFerge
Copy link
Member Author

Copy link

codecov bot commented Dec 12, 2024

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
23295 1 23294 213
View the top 1 failed tests by shortest run time
tests.sentry.api.serializers.test_team.TeamWithProjectsSerializerTest::test_simple
Stack Traces | 2.53s run time
#x1B[1m#x1B[.../api/serializers/test_team.py#x1B[0m:257: in test_simple
    assert result == {
#x1B[1m#x1B[31mE   AssertionError: assert {'access': fr...ams': [], ...} == {'access': {'...ams': [], ...}#x1B[0m
#x1B[1m#x1B[31mE     #x1B[0m
#x1B[1m#x1B[31mE     Omitting 13 identical items, use -vv to show#x1B[0m
#x1B[1m#x1B[31mE     Differing items:#x1B[0m
#x1B[1m#x1B[31mE     {'projects': [{'access': set(), 'avatar': {'avatarType': 'letter_avatar', 'avatarUuid': None}, 'color': '#87bf3f', 'da...r': '#3f8fbf', 'dateCreated': datetime.datetime(2024, 12, 12, 23, 34, 30, 203245, tzinfo=datetime.timezone.utc), ...}]} != {'projects': [{'access': set(), 'avatar': {'avatarType': 'letter_avatar', 'avatarUuid': None}, 'color': '#87bf3f', 'da...r': '#3f8fbf', 'dateCreated': datetime.datetime(2024, 12, 12, 23, 34, 30, 203245, tzinfo=datetime.timezone.utc), ...}]}#x1B[0m
#x1B[1m#x1B[31mE     #x1B[0m
#x1B[1m#x1B[31mE     Full diff:#x1B[0m
#x1B[1m#x1B[31mE       {#x1B[0m
#x1B[1m#x1B[31mE     -     'access': {#x1B[0m
#x1B[1m#x1B[31mE     +     'access': frozenset({#x1B[0m
#x1B[1m#x1B[31mE     ?               ++++++++++#x1B[0m
#x1B[1m#x1B[31mE               'alerts:read',#x1B[0m
#x1B[1m#x1B[31mE               'event:read',#x1B[0m
#x1B[1m#x1B[31mE               'event:write',#x1B[0m
#x1B[1m#x1B[31mE               'member:read',#x1B[0m
#x1B[1m#x1B[31mE               'org:read',#x1B[0m
#x1B[1m#x1B[31mE               'project:read',#x1B[0m
#x1B[1m#x1B[31mE               'project:releases',#x1B[0m
#x1B[1m#x1B[31mE               'team:read',#x1B[0m
#x1B[1m#x1B[31mE     -     },#x1B[0m
#x1B[1m#x1B[31mE     +     }),#x1B[0m
#x1B[1m#x1B[31mE     ?      +#x1B[0m
#x1B[1m#x1B[31mE           'avatar': {#x1B[0m
#x1B[1m#x1B[31mE               'avatarType': 'letter_avatar',#x1B[0m
#x1B[1m#x1B[31mE               'avatarUuid': None,#x1B[0m
#x1B[1m#x1B[31mE           },#x1B[0m
#x1B[1m#x1B[31mE           'dateCreated': datetime.datetime(2024, 12, 12, 23, 34, 30, 165837, tzinfo=datetime.timezone.utc),#x1B[0m
#x1B[1m#x1B[31mE           'externalTeams': [],#x1B[0m
#x1B[1m#x1B[31mE           'flags': {#x1B[0m
#x1B[1m#x1B[31mE               'idp:provisioned': False,#x1B[0m
#x1B[1m#x1B[31mE           },#x1B[0m
#x1B[1m#x1B[31mE           'hasAccess': True,#x1B[0m
#x1B[1m#x1B[31mE           'id': '4555205824086017',#x1B[0m
#x1B[1m#x1B[31mE           'isMember': False,#x1B[0m
#x1B[1m#x1B[31mE           'isPending': False,#x1B[0m
#x1B[1m#x1B[31mE           'memberCount': 0,#x1B[0m
#x1B[1m#x1B[31mE           'name': 'Noble Monarch',#x1B[0m
#x1B[1m#x1B[31mE           'projects': [#x1B[0m
#x1B[1m#x1B[31mE               {#x1B[0m
#x1B[1m#x1B[31mE                   'access': set(),#x1B[0m
#x1B[1m#x1B[31mE                   'avatar': {#x1B[0m
#x1B[1m#x1B[31mE                       'avatarType': 'letter_avatar',#x1B[0m
#x1B[1m#x1B[31mE                       'avatarUuid': None,#x1B[0m
#x1B[1m#x1B[31mE                   },#x1B[0m
#x1B[1m#x1B[31mE                   'color': '#87bf3f',#x1B[0m
#x1B[1m#x1B[31mE                   'dateCreated': datetime.datetime(2024, 12, 12, 23, 34, 30, 229476, tzinfo=datetime.timezone.utc),#x1B[0m
#x1B[1m#x1B[31mE                   'features': [#x1B[0m
#x1B[1m#x1B[31mE                       'data-forwarding',#x1B[0m
#x1B[1m#x1B[31mE                       'rate-limits',#x1B[0m
#x1B[1m#x1B[31mE     -                 'alert-filters',#x1B[0m
#x1B[1m#x1B[31mE                       'first-event-severity-new-escalation',#x1B[0m
#x1B[1m#x1B[31mE                       'minidump',#x1B[0m
#x1B[1m#x1B[31mE     -                 'race-free-group-creation',#x1B[0m
#x1B[1m#x1B[31mE                   ],#x1B[0m
#x1B[1m#x1B[31mE                   'firstEvent': None,#x1B[0m
#x1B[1m#x1B[31mE                   'firstTransactionEvent': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasAccess': True,#x1B[0m
#x1B[1m#x1B[31mE                   'hasCustomMetrics': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasFeedbacks': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsAppStart': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsAssets': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsCaches': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsDb': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsHttp': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsLlmMonitoring': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsQueues': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsScreenLoad': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsVitals': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasMinifiedStackTrace': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasMonitors': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasNewFeedbacks': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasProfiles': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasReplays': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasSessions': False,#x1B[0m
#x1B[1m#x1B[31mE                   'id': '4555205824086019',#x1B[0m
#x1B[1m#x1B[31mE                   'isBookmarked': False,#x1B[0m
#x1B[1m#x1B[31mE                   'isInternal': False,#x1B[0m
#x1B[1m#x1B[31mE                   'isMember': False,#x1B[0m
#x1B[1m#x1B[31mE                   'isPublic': False,#x1B[0m
#x1B[1m#x1B[31mE                   'name': 'bar',#x1B[0m
#x1B[1m#x1B[31mE                   'platform': None,#x1B[0m
#x1B[1m#x1B[31mE                   'slug': 'bar',#x1B[0m
#x1B[1m#x1B[31mE                   'status': 'active',#x1B[0m
#x1B[1m#x1B[31mE               },#x1B[0m
#x1B[1m#x1B[31mE               {#x1B[0m
#x1B[1m#x1B[31mE                   'access': set(),#x1B[0m
#x1B[1m#x1B[31mE                   'avatar': {#x1B[0m
#x1B[1m#x1B[31mE                       'avatarType': 'letter_avatar',#x1B[0m
#x1B[1m#x1B[31mE                       'avatarUuid': None,#x1B[0m
#x1B[1m#x1B[31mE                   },#x1B[0m
#x1B[1m#x1B[31mE                   'color': '#3f8fbf',#x1B[0m
#x1B[1m#x1B[31mE                   'dateCreated': datetime.datetime(2024, 12, 12, 23, 34, 30, 203245, tzinfo=datetime.timezone.utc),#x1B[0m
#x1B[1m#x1B[31mE                   'features': [#x1B[0m
#x1B[1m#x1B[31mE                       'data-forwarding',#x1B[0m
#x1B[1m#x1B[31mE                       'rate-limits',#x1B[0m
#x1B[1m#x1B[31mE     -                 'alert-filters',#x1B[0m
#x1B[1m#x1B[31mE                       'first-event-severity-new-escalation',#x1B[0m
#x1B[1m#x1B[31mE                       'minidump',#x1B[0m
#x1B[1m#x1B[31mE     -                 'race-free-group-creation',#x1B[0m
#x1B[1m#x1B[31mE                   ],#x1B[0m
#x1B[1m#x1B[31mE                   'firstEvent': None,#x1B[0m
#x1B[1m#x1B[31mE                   'firstTransactionEvent': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasAccess': True,#x1B[0m
#x1B[1m#x1B[31mE                   'hasCustomMetrics': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasFeedbacks': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsAppStart': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsAssets': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsCaches': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsDb': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsHttp': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsLlmMonitoring': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsQueues': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsScreenLoad': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasInsightsVitals': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasMinifiedStackTrace': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasMonitors': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasNewFeedbacks': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasProfiles': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasReplays': False,#x1B[0m
#x1B[1m#x1B[31mE                   'hasSessions': False,#x1B[0m
#x1B[1m#x1B[31mE                   'id': '4555205824086018',#x1B[0m
#x1B[1m#x1B[31mE                   'isBookmarked': False,#x1B[0m
#x1B[1m#x1B[31mE                   'isInternal': False,#x1B[0m
#x1B[1m#x1B[31mE                   'isMember': False,#x1B[0m
#x1B[1m#x1B[31mE                   'isPublic': False,#x1B[0m
#x1B[1m#x1B[31mE                   'name': 'foo',#x1B[0m
#x1B[1m#x1B[31mE                   'platform': None,#x1B[0m
#x1B[1m#x1B[31mE                   'slug': 'foo',#x1B[0m
#x1B[1m#x1B[31mE                   'status': 'active',#x1B[0m
#x1B[1m#x1B[31mE               },#x1B[0m
#x1B[1m#x1B[31mE           ],#x1B[0m
#x1B[1m#x1B[31mE           'slug': 'noble-monarch',#x1B[0m
#x1B[1m#x1B[31mE           'teamRole': None,#x1B[0m
#x1B[1m#x1B[31mE       }#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

@JoshFerge JoshFerge merged commit 3d51b11 into master Dec 13, 2024
49 checks passed
@JoshFerge JoshFerge deleted the jferg/perf-update branch December 13, 2024 18:17
evanh pushed a commit that referenced this pull request Dec 17, 2024
use the `ununusedFeatures` collapse parameter in more places. see some
slowness due to teams serializer having to render all of the project
feature flags.
@github-actions github-actions bot locked and limited conversation to collaborators Dec 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants