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

don't run dbmigrate twice #128

Closed
hairmare opened this issue Aug 4, 2022 · 1 comment
Closed

don't run dbmigrate twice #128

hairmare opened this issue Aug 4, 2022 · 1 comment

Comments

@hairmare
Copy link
Contributor

hairmare commented Aug 4, 2022

Currently migrations are both in the helm chart's timed/templates/job-dbmigrate.yaml as well as in the entrypoint:
https://github.com/adfinis/timed-backend/blob/055dc6e4439bde4c164ca795c5e4624d57783f2c/cmd.sh#L8

Running the migrations twice for each release may lead to race conditions and isn't the smart thing to do.

I'm currently amending the chart so we can disable running the dbmigrate job as a workaround. IMO running dbmigrate as it's own kubernetes Job is much cleaner than doing it as part of cmd.sh so i'd like to not keep the job enabled. I'm proposing we get rid of the command from cmd.sh and updating the docs to show how to run it locally with compose exec instead of having it run when you spin up the dev env. It's also likely that the current Job needs some tuning to ensure it runs at the right time during the sync process, this is something we'll want to tune once it's migrated to DBaaS.

@trowik trowik transferred this issue from adfinis/timed-backend Dec 6, 2023
@c0rydoras c0rydoras transferred this issue from adfinis/timed-frontend May 13, 2024
@hairmare
Copy link
Contributor Author

fixed in bb90f8b

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in timed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant