Skip to content
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

Merged
merged 3 commits into from
Mar 20, 2024
Merged

Add alteration notifications and management #5097

merged 3 commits into from
Mar 20, 2024

Conversation

sfmskywalker
Copy link
Member

@sfmskywalker sfmskywalker commented Mar 19, 2024

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

Implement notification publishing for completed alteration plans and add related handlers and management logic to coordinate alterations workflow triggering and completion status updates.
@sfmskywalker sfmskywalker requested review from a team March 19, 2024 17:14
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)
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Why?

Copy link
Contributor

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.

Copy link
Member Author

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)
Copy link
Contributor

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.

@sfmskywalker sfmskywalker merged commit 8079dd0 into main Mar 20, 2024
6 checks passed
@sfmskywalker sfmskywalker deleted the issue/5096 branch March 20, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alterations API: Submitted planned is stuck on status: Dispatching
3 participants