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

chore(rules): make Rule not optional in RuleBase #87356

Closed
wants to merge 1 commit into from

Conversation

cathteng
Copy link
Member

No description provided.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 18, 2025
@cathteng
Copy link
Member Author

i don't think you can do this, i ran mypy and it failed

Copy link

codecov bot commented Mar 18, 2025

❌ 301 Tests Failed:

Tests completed Failed Passed Skipped
24414 301 24113 300
View the top 3 failed test(s) by shortest run time
tests.sentry.api.endpoints.test_project_agnostic_rule_conditions.ProjectAgnosticRuleConditionsTest::test_simple
Stack Traces | 1.44s run time
#x1B[1m#x1B[.../api/endpoints/test_project_agnostic_rule_conditions.py#x1B[0m:13: in test_simple
    assert response.status_code == 200, response.content
#x1B[1m#x1B[31mE   AssertionError: b'{"detail":"Internal Error","errorId":null}'#x1B[0m
#x1B[1m#x1B[31mE   assert 500 == 200#x1B[0m
#x1B[1m#x1B[31mE    +  where 500 = <Response status_code=500, "application/json">.status_code#x1B[0m
tests.sentry.rules.conditions.test_event_attribute.EventAttributeConditionTest::test_render_label
Stack Traces | 1.89s run time
#x1B[1m#x1B[.../rules/conditions/test_event_attribute.py#x1B[0m:83: in test_render_label
    rule = self.get_rule(data={"match": MatchType.EQUAL, "attribute": "\xc3", "value": "\xc4"})
#x1B[1m#x1B[.../sentry/testutils/cases.py#x1B[0m:868: in get_rule
    return self.rule_cls(**kwargs)
#x1B[1m#x1B[31mE   TypeError: RuleBase.__init__() missing 1 required positional argument: 'rule'#x1B[0m
tests.sentry.rules.conditions.test_level_event.LevelConditionTest::test_render_label
Stack Traces | 1.92s run time
#x1B[1m#x1B[.../rules/conditions/test_level_event.py#x1B[0m:13: in test_render_label
    rule = self.get_rule(data={"match": MatchType.EQUAL, "level": "30"})
#x1B[1m#x1B[.../sentry/testutils/cases.py#x1B[0m:868: in get_rule
    return self.rule_cls(**kwargs)
#x1B[1m#x1B[31mE   TypeError: RuleBase.__init__() missing 1 required positional argument: 'rule'#x1B[0m

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

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.

1 participant