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

Dvince/clean up workflows #4499

Merged
merged 9 commits into from
Aug 21, 2024
Merged

Dvince/clean up workflows #4499

merged 9 commits into from
Aug 21, 2024

Conversation

dvince2
Copy link
Collaborator

@dvince2 dvince2 commented Aug 19, 2024

Description

This is a tentitive proposal for how to clean up workflows. Functionally this works however I'm not sure if its the "best" solution available and any feedback would be welcome. Basically...

  • In the workflow table, we check the nodes and edges columns which are json arrays, and collect any workflows which have a node and an edge marked for deletion
  • These workflows are returned in a set as there may be some overlap between the two collections.
  • In Java we remove the edges and nodes from their lists inside of the workflow
  • The workflows are all saved.

Is it possible to find both nodes and edges at once in a single call or will it always be two?

@dvince2 dvince2 requested a review from kbirk August 19, 2024 19:08
Copy link
Contributor

@bigglesandginger bigglesandginger left a comment

Choose a reason for hiding this comment

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

I think this is a "best of both worlds" approach. It is clear, the SQL is easy to read, and the Java leverages the existing knowledge space. Could it be faster all in PostGres... maybe but for not much of a gain.

@dvince2 dvince2 marked this pull request as ready for review August 20, 2024 19:54
@dvince2 dvince2 requested a review from YohannParis as a code owner August 20, 2024 19:54
Copy link
Member

@mwdchang mwdchang left a comment

Choose a reason for hiding this comment

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

Didn't test, but code seems okay

@dvince2 dvince2 merged commit de129a5 into main Aug 21, 2024
6 checks passed
@dvince2 dvince2 deleted the dvince/clean_up_workflows branch August 21, 2024 15:10
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.

3 participants