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

fix(console): Remove reference edges before removing app node #2572

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

betimshahini
Copy link
Contributor

Description

deleteApp() was removing the app edge, but was not also removing the edge references that are used to associate the dev email to the app. This fixes the scenario.

Related Issues

Testing

  1. Create app in Console
  2. Associate a dev email in Team and Contacts
  3. Go back to dashboard and delete app.

Checklist

  • I have read the CONTRIBUTING guidelines
  • I have tested my code (manually and/or automated if applicable)
  • I have updated the documentation (if necessary)

@betimshahini betimshahini marked this pull request as ready for review August 2, 2023 22:20
Copy link
Contributor

@maurerbot maurerbot left a comment

Choose a reason for hiding this comment

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

should just be two awaits in sequence?

tag: EDGE_APPLICATION,
}),
]
await Promise.all(edgeRemovalPromises)
Copy link
Contributor

Choose a reason for hiding this comment

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

Promise.all does only await multiple promises. It doesn't care in what order they resolve, or whether the computations are running in parallel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We may be able to get away from it for now to sequence them, but there may be scenarios where there are multiple reference edges coming back in the future. I'd rather leave it here as a bit of future-proofing, but won't push back on objection 🤷

The order shouldn't be a problem as the things being deleted are from separate tables that both have a foreign constraint on node table. We just need these to be deleted before the node-deletion.

@maurerbot maurerbot merged commit 89b9960 into main Aug 2, 2023
12 checks passed
@maurerbot maurerbot deleted the fix/2480-app-delete-with-email branch August 2, 2023 22:37
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.

fix(edges): deleting published app in console causes edges error
2 participants