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

Improved workflow creation vs update process in the Dashboard #469

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

JBBianchi
Copy link
Member

Many thanks for submitting your Pull Request ❤️!

What this PR does / why we need it:
This PR introduces an improvement in the workflow creation/update page of the Synapse Dashboard by optimizing the API call behavior.

Previously, the application relied on calling the API to check if a workflow definition already existed, leading to a significant number of 404 errors in the logs when the definition was not found. This behavior was suboptimal and caused unnecessary strain on the API.

To address this, a variable in the page's state has been introduced to determine if the workflow needs to be created or updated. In addition, when creating, if a conflict is detected, the process will fallback and try to "update" (= create a new version).

Closes #457

- An `IsNew` variable was added to the state, which tracks whether the workflow is new or existing. This change prevents unnecessary API calls, reducing 404 errors and improving efficiency.

Signed-off-by: Jean-Baptiste Bianchi <[email protected]>
@JBBianchi JBBianchi added type: enhancement New feature or request app: dashboard Concerns the Dashboard UI priority: low Indicates a low priority issue weight: 1 An issue that has a very low development impact labels Dec 16, 2024
@JBBianchi JBBianchi added this to the v1.0.0 milestone Dec 16, 2024
@JBBianchi JBBianchi requested a review from cdavernas December 16, 2024 11:23
@JBBianchi JBBianchi self-assigned this Dec 16, 2024
- An `IsNew` variable was added to the state, which tracks whether the function is new or existing. This change prevents unnecessary API calls, reducing 404 errors and improving efficiency.

Signed-off-by: Jean-Baptiste Bianchi <[email protected]>
Copy link
Member

@cdavernas cdavernas left a comment

Choose a reason for hiding this comment

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

LGTM! Many thanks ❤️

@cdavernas cdavernas merged commit 05d0a43 into main Dec 17, 2024
2 checks passed
@cdavernas cdavernas deleted the fix-457-workflow-existence-check branch December 17, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app: dashboard Concerns the Dashboard UI priority: low Indicates a low priority issue type: enhancement New feature or request weight: 1 An issue that has a very low development impact
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Improve workflow existence check to prevent misleading 404 logs
2 participants