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

ref: remove some dead code from plugins #83581

Merged
merged 25 commits into from
Jan 16, 2025

Conversation

asottile-sentry
Copy link
Member

found via https://github.com/asottile/dead

each individual commit shows when the function was last called

Copy link

codecov bot commented Jan 16, 2025

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
21301 2 21299 272
View the top 1 failed tests by shortest run time
tests.sentry.api.endpoints.test_project_plugins.ProjectPluginsTest::test_get
Stack Traces | 2.69s run time
#x1B[1m#x1B[.../api/endpoints/test_project_plugins.py#x1B[0m:33: in test_get
    self.assert_plugin_shape(auto_tag)
#x1B[1m#x1B[.../api/endpoints/test_project_plugins.py#x1B[0m:47: in assert_plugin_shape
    assert "status" in plugin
#x1B[1m#x1B[31mE   AssertionError: assert 'status' in {'altIsSentryApp': None, 'author': {'name': 'Sentry Team', 'url': 'https://github.com/getsentry/sentry'}, 'canDisable': True, 'contexts': [], ...}#x1B[0m
View the full list of 1 ❄️ flaky tests
tests.sentry.api.endpoints.test_organization_events_trends_v2.OrganizationEventsTrendsStatsV2EndpointTest::test_two_projects_same_transaction_split_queries

Flake rate in main: 9.26% (Passed 49 times, Failed 5 times)

Stack Traces | 5.92s run time
#x1B[1m#x1B[.../api/endpoints/test_organization_events_trends_v2.py#x1B[0m:414: in test_two_projects_same_transaction_split_queries
    assert len(trends_call_args_data_1[f"{project1.id},foo bar*"]) > 0
#x1B[1m#x1B[31mE   KeyError: '4555395139895300,foo bar*'#x1B[0m

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

introduced in several commits but never called
introduced in 447f1e3 never referenced
introduced in 26c0d15 and never referenced
introduced in 26c0d15 but never used
this was always "unknown" so not useful
last reference removed in fbb1f06
last reference removed in d2102d3
introduced in b19aa76 but never used
last reference removed in 832ee5b
last reference removed in 5c93fc1
last reference removed in 5c93fc1
last reference removed in 367a687
@@ -67,7 +67,6 @@ def serialize(self, obj, attrs, user, **kwargs):
"hasConfiguration": obj.has_project_conf(),
"metadata": obj.get_metadata(),
"contexts": contexts,
"status": obj.get_status(),
Copy link
Member

Choose a reason for hiding this comment

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

is there some associated frontend type change or anything for this?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried to find one but I don't think our frontend actually loads or uses this at all

Copy link
Member

Choose a reason for hiding this comment

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

I absolutely cannot believe we even have a redmine plugin

Copy link
Member

@evanpurkhiser evanpurkhiser left a comment

Choose a reason for hiding this comment

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

I didn't look at every signle line, but I trust how thourough this is given how you've written each commit. Thank you for doing this Anthony!

@asottile-sentry asottile-sentry enabled auto-merge (squash) January 16, 2025 16:48
@asottile-sentry asottile-sentry merged commit d7e5d5d into master Jan 16, 2025
47 checks passed
@asottile-sentry asottile-sentry deleted the asottile-dead-code-plugins branch January 16, 2025 16:58
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.

2 participants