-
Notifications
You must be signed in to change notification settings - Fork 25
DEVPROD-2227: Remove family triggers from trigger definitions #2203
Conversation
1 flaky test on run #15085 ↗︎
Details:
Review all test suite changes for PR #2203 ↗︎ |
src/constants/triggers.ts
Outdated
@@ -309,7 +309,7 @@ export const projectTriggers: Trigger = { | |||
[ProjectTriggers.SUCCESSFUL_TASK_EXCEEDS_DURATION]: { | |||
trigger: TriggerType.SUCCESSFUL_EXCEEDS_DURATION, | |||
resourceType: ResourceType.Task, | |||
label: "The Runtime For a Successful Task Exceeds Some Duration", | |||
label: "The runtime For a successful task exceeds some duration", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label: "The runtime For a successful task exceeds some duration", | |
label: "The runtime for a successful task exceeds some duration", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you... 🥹
src/constants/triggers.ts
Outdated
}; | ||
|
||
export const convertFamilyTrigger = (trigger: string) => { | ||
export const fromFamilyTrigger = (trigger: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this function have a comment on why it's used?
export const fromFamilyTrigger = (trigger: string) => { | |
export const simplifyFamilyTrigger = (trigger: string) => { |
@@ -25,9 +25,10 @@ const getTriggerText = (trigger: string, resourceType: string) => { | |||
}; | |||
|
|||
const getTriggerEnum = (trigger: string, resourceType: string) => { | |||
const convertedTrigger = fromFamilyTrigger(trigger); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you improve the variable naming for convertedTrigger
. The family conversion logic may also do well in the resolver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resolver is a good idea! I will file a ticket for it -- shouldn't be too difficult of a change!
DEVPROD-2227
Description
This PR removes the usage of family triggers from the trigger definitions.
It's too complicated to process which trigger we need to assign in the frontend. The notifications are already quite tricky and they would become even harder to understand if we added another layer of complexity. Instead, we will make up for it by doing some extra processing in the backend.
Evergreen PR