-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add alteration notifications and management #5097
Conversation
Implement notification publishing for completed alteration plans and add related handlers and management logic to coordinate alterations workflow triggering and completion status updates.
The initialization of the queue address and mapping for the `RunAlterationJob` has been moved out of the `Apply` method to the module configuration.
{ | ||
Result = new(jobCount) | ||
}, | ||
new If(context => jobCount.Get(context) > 0) |
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 we check if the correct jobs have been created instead of just relying on the count?
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.
Why?
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.
If we can guarantee that there will be no duplicates created than the count should be enough. However if we can not guarantee it we should check to see if the correct plans have been created.
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.
This logic is about determining if the Plan has any jobs or not. Because of no jobs were created, the plan should complete immediately. If at least one job was created, then we will wait for it to complete. Even if duplicate jobs are created (of which I have seen no evidence or suspect logic), we only care about the number of jobs in order to know if we need to complete the plan or wait for the jobs to complete.
Given this context, do you still see a potential problem with this logic?
The activity summary comment in CompleteAlterationPlan.cs was updated to accurately describe its functionality. The description has been changed from "Submits an alteration plan for execution" to "Marks an alteration plan as completed."
{ | ||
Result = new(jobCount) | ||
}, | ||
new If(context => jobCount.Get(context) > 0) |
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.
If we can guarantee that there will be no duplicates created than the count should be enough. However if we can not guarantee it we should check to see if the correct plans have been created.
Implement notification publishing for completed alteration plans and add related handlers and management logic to coordinate alterations workflow triggering and completion status updates.
Fixes #5096