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 current queryRunner rather than a free-floating data source when checking if a migration can rely on PostgreSQL v13 or later [MRXN23-273] #1412

Conversation

hotzevzl
Copy link
Member

@hotzevzl hotzevzl commented Aug 1, 2023

Testing instructions

(careful: this will destroy all data in the instance where the PR is checked!)

make clean-slate && make start-api should rebuild and start the API and geoprocessing services correctly (without this fix, the services would fail to start with errors related to the use of PostgresqlUtils.version13Plus() in the first migration that uses this function).

Feature relevant tickets

https://vizzuality.atlassian.net/browse/MRXN23-273


Checklist before submitting

  • Meaningful commits and code rebased on develop.
  • If this PR adds feature that should be tested for regressions when
    deploying to staging/production, please add brief testing instructions
    to the deploy checklist (docs/deployment-checklist.md)
  • Update CHANGELOG file

@hotzevzl hotzevzl requested a review from yulia-bel August 1, 2023 14:50
@hotzevzl
Copy link
Member Author

hotzevzl commented Aug 1, 2023

@yulia-bel could you please have a look at my mid-afternoon brain explosion leading to this PR when you have a chance?

IIRC you also run into this issue recently when setting up an instance in containers on your laptop - I don't know why this doesn't cause any issues every time we basically spin up a full new MaPP cluster in compose in CI and run all the migrations there, whereas it does explode miserably when upping a local dev environment (well, in practice it's because we run migrations explicitly in CI whereas we do run them automatically as part of service startup in local envs, though how exactly this makes the former run without issues is not something I've explored in detail, but whatever).

@yulia-bel
Copy link
Contributor

@hotzevzl yes, it happened when I re-created databases in my local, now I tested with make clean-slate and the make start-api - everything works and no connection errors!

@hotzevzl hotzevzl merged commit 970f9e5 into develop Aug 2, 2023
52 checks passed
@hotzevzl hotzevzl deleted the fix/api/MRXN23-273_fix-abuse-of-free-floating-datasource-from-migrations branch August 2, 2023 08:46
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.

2 participants