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

admin --check-database also checks database vs nominatim version #3238

Merged
merged 1 commit into from
Jan 7, 2024

Conversation

mtmail
Copy link
Collaborator

@mtmail mtmail commented Nov 2, 2023

Should the test run before other tests or later? I think the hints should give instruction for lower database version or lower nominatim version.

nominatim admin --check-database
2023-11-02 15:12:55: Using project directory: /home/vagrant/nominatim-project
2023-11-02 15:12:55: Checking database
Checking database connection ... OK
Checking database_version matches Nominatim software version ... Failed
Database version (4.3.0-0) doesn't match Nominatim version (4.1.0-0)

Hints:
* Are you connecting to the right database?
* Have you run all migrations?

Project directory: /home/vagrant/nominatim-project
Current setting of NOMINATIM_DATABASE_DSN: pgsql:dbname=nominatim

@lonvia
Copy link
Member

lonvia commented Nov 2, 2023

That's the right place to run it.

The hints should definitely distinguish between db_version < nominatim_version ("Please migrate") and vice versa ("You must not run an older Nominatim on a newer database. Upgrade your software.")

test/python/tools/test_check_database.py Outdated Show resolved Hide resolved
nominatim/tools/check_database.py Outdated Show resolved Hide resolved
@mtmail mtmail force-pushed the check-database-for-version-match branch from 58e5f5e to 1ccc865 Compare December 28, 2023 21:39
@mtmail mtmail requested a review from lonvia December 28, 2023 21:41
@lonvia
Copy link
Member

lonvia commented Jan 6, 2024

Can you please rebase on master? That will solve the CI fails.

@mtmail mtmail force-pushed the check-database-for-version-match branch from 1ccc865 to 1d7e078 Compare January 6, 2024 19:57
@mtmail
Copy link
Collaborator Author

mtmail commented Jan 6, 2024

@lonvia Rebased now and indeed tests are passing.

@lonvia lonvia merged commit dc52d09 into osm-search:master Jan 7, 2024
9 checks passed
@mtmail mtmail deleted the check-database-for-version-match branch April 23, 2024 14:08
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