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

Use findOrCreate to handle retrying failed setup #2325

Merged
merged 1 commit into from
Jun 22, 2023
Merged

Conversation

Pezmc
Copy link
Contributor

@Pezmc Pezmc commented Jun 22, 2023

Description

If setup fails at any step, the database can be left in a half setup state.

When the user tries setup a second time, it fails with a database constraint about duplicate entries.
Using findOrCreate means if the record already exists, it won't try to be recreated.

Related Issue(s)

Checklist

  • I have read the contribution guidelines
  • [-] Suitable unit/system level tests have been added and they pass - Not sure how to test setup reliably...
  • Documentation has been updated
    • Upgrade instructions
    • Configuration details
    • Concepts
  • Changes flowforge.yml?
    • Issue/PR raised on flowforge/helm to update ConfigMap Template
    • Issue/PR raised on flowforge/CloudProject to update values for Staging/Production

Labels

  • Backport needed? -> add the backport label
  • Includes a DB migration? -> add the area:migration label

@Pezmc Pezmc requested a review from hardillb June 22, 2023 15:36
@hardillb hardillb merged commit eb12d8d into main Jun 22, 2023
3 checks passed
@hardillb hardillb deleted the fix-failed-setup branch June 22, 2023 15:38
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.

None yet

2 participants