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

Made loading workflows more robust #5074

Merged
merged 1 commit into from Mar 14, 2024
Merged

Conversation

raymonddenhaan
Copy link
Contributor

Fixes #5033 and other issues with importing workflow definitions through background processes.

  • Prevents trying to add multiple versions with the Id
  • Prevents multiple definitions with status IsLatest
  • Makes most recent workflow (based on version) leading
  • Fixes version comparison that caused issues in earlier attempts of this fix (Version from Identity compared to Version from root)

{
if (latestWorkflowDefinition.Version > workflow.Identity.Version)
{
_logger.LogWarning("A more recent version of the workflow has been found, overwriting the IsLatest property on the workflow.");
Copy link
Member

Choose a reason for hiding this comment

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

Log event messages should be fragments, not sentences. Avoid a trailing period/full stop.

{
if (publishedWorkflowDefinition.Version > workflow.Identity.Version)
{
_logger.LogWarning("A more recent version of the workflow has been found to be published, overwriting the IsPublished property on the workflow.");
Copy link
Member

Choose a reason for hiding this comment

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

Log event messages should be fragments, not sentences. Avoid a trailing period/full stop.

@raymonddenhaan raymonddenhaan merged commit c1d0e7a into main Mar 14, 2024
6 checks passed
@raymonddenhaan raymonddenhaan deleted the fix/workflow-populator branch March 14, 2024 15:08
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.

ON CONFLICT DO UPDATE command cannot affect row a second time while loading WorkflowDefinitions
2 participants