Skip to content

fix(detectors): Require data sources for Detector creation by default#110246

Merged
kcons merged 3 commits intomasterfrom
kcons/needdsorc
Mar 9, 2026
Merged

fix(detectors): Require data sources for Detector creation by default#110246
kcons merged 3 commits intomasterfrom
kcons/needdsorc

Conversation

@kcons
Copy link
Member

@kcons kcons commented Mar 9, 2026

This ensures that Detectors require data sources to be created by default, with an opt-out for DataSource-less cases.

Fixes SENTRY-5KZC.

@kcons kcons requested a review from malwilley March 9, 2026 20:09
@kcons kcons requested review from a team as code owners March 9, 2026 20:09
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 9, 2026
Copy link
Member

@malwilley malwilley left a comment

Choose a reason for hiding this comment

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

Should we put this in the base class or are there some detectors that don't need data sources?

@kcons kcons requested a review from a team as a code owner March 9, 2026 21:09
@kcons kcons changed the title fix(detectors): Require data sources for cron monitor creation fix(detectors): Require data sources for Detector creation by default Mar 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 9, 2026

Backend Test Failures

Failures on a8cd866 in this run:

tests/sentry/workflow_engine/detectors/test_error_detector.py::TestErrorDetectorValidator::test_createlog
tests/sentry/workflow_engine/detectors/test_error_detector.py:35: in test_create
    assert validator.is_valid()
E   assert False
E    +  where False = <bound method BaseSerializer.is_valid of ErrorDetectorValidator(context={'organization': <Organization at 0x7f809db04e...lly resolve an issue if it hasn't been seen for this many hours. Set to `0` to disable auto-resolve.", required=False)>()
E    +    where <bound method BaseSerializer.is_valid of ErrorDetectorValidator(context={'organization': <Organization at 0x7f809db04e...lly resolve an issue if it hasn't been seen for this many hours. Set to `0` to disable auto-resolve.", required=False)> = ErrorDetectorValidator(context={'organization': <Organization at 0x7f809db04e10: id=4557764654333952, owner_id=None, n...ally resolve an issue if it hasn't been seen for this many hours. Set to `0` to disable auto-resolve.", required=False).is_valid

@kcons kcons merged commit e7a9628 into master Mar 9, 2026
56 checks passed
@kcons kcons deleted the kcons/needdsorc branch March 9, 2026 22:06
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