Skip to content

Commit

Permalink
Adds initial canary support
Browse files Browse the repository at this point in the history
  • Loading branch information
kevgliss committed Sep 11, 2023
1 parent 7b3ac8c commit 394b567
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/dispatch/signal/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ def signal_instance_create_flow(
)
return signal_instance

# limited support for canary signals, just store the instance and return
if signal_instance.canary:
return signal_instance

if not signal_instance.signal.create_case:
return signal_instance

Expand Down
2 changes: 2 additions & 0 deletions src/dispatch/signal/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ class SignalInstance(Base, TimeStampMixin, ProjectMixin):
case_priority = relationship("CasePriority", backref="signal_instances")
fingerprint = Column(String)
filter_action = Column(String)
canary = Column(Boolean, default=False)
raw = Column(JSONB)
signal = relationship("Signal", backref="instances")
signal_id = Column(Integer, ForeignKey("signal.id"))
Expand Down Expand Up @@ -301,6 +302,7 @@ class SignalBase(DispatchBase):
case_type: Optional[CaseTypeRead]
case_priority: Optional[CasePriorityRead]
external_id: str
canary: Optional[bool] = False
enabled: Optional[bool] = False
external_url: Optional[str]
create_case: Optional[bool] = True
Expand Down

0 comments on commit 394b567

Please sign in to comment.