-
Notifications
You must be signed in to change notification settings - Fork 29
EDM-4999: Redefine which statuses allow start/stop actions #763
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,13 @@ export const startableStatuses = [ | |
| ApplicationStatusType.ApplicationStatusStopping, | ||
| ApplicationStatusType.ApplicationStatusStopped, | ||
| ApplicationStatusType.ApplicationStatusError, | ||
| ApplicationStatusType.ApplicationStatusUnknown, | ||
| ]; | ||
|
|
||
| export const stoppableStatuses = [ | ||
| ApplicationStatusType.ApplicationStatusRunning, | ||
| ApplicationStatusType.ApplicationStatusError, | ||
| ApplicationStatusType.ApplicationStatusUnknown, | ||
|
Comment on lines
+32
to
+38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Do not use
Keep Minimal fix case 'stop':
- return startableStatuses.includes(currentStatus);
+ return (
+ startableStatuses.includes(currentStatus) &&
+ currentStatus !== ApplicationStatusType.ApplicationStatusUnknown
+ );🤖 Prompt for AI Agents |
||
| ]; | ||
|
|
||
| export type ApplicationLifecycleAction = 'start' | 'stop' | 'restart'; | ||
|
|
||
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.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Remove the duplicate
stoppableStatusesdeclaration.The component imports
stoppableStatusesat Line 24. The supplied graph context also showsexport const stoppableStatusesin this module at Lines 35-39. TypeScript rejects the duplicate import/local binding, so the build cannot compile.Keep the utility export as the single source of truth. Remove the component-local declaration and migrate any external consumers to the utility export.
Proposed fix
🤖 Prompt for AI Agents