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

verdi status: distinguish database schema version incompatible #4319

Merged

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Aug 23, 2020

Fixes #4282

If verdi status was called for a profile whose database schema version
is incompatible with the current code, a generic error was thrown that
no connection could be made to PostgreSQL. The connection is often fine,
it is just that AiiDA prohibits it until the database is made
compatible. Often one simply has to migrate the database after
installing a newer version of the code. This case is no caught
separately and the user is pointed to verdi database migrate.

If `verdi status` was called for a profile whose database schema version
is incompatible with the current code, a generic error was thrown that
no connection could be made to PostgreSQL. The connection is often fine,
it is just that AiiDA prohibits it until the database is made
compatible. Often one simply has to migrate the database after
installing a newer version of the code. This case is no caught
separately and the user is pointed to `verdi database migrate`.
@codecov
Copy link

codecov bot commented Aug 23, 2020

Codecov Report

Merging #4319 into develop will decrease coverage by 0.02%.
The diff coverage is 66.67%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4319      +/-   ##
===========================================
- Coverage    79.05%   79.04%   -0.01%     
===========================================
  Files          468      468              
  Lines        34605    34610       +5     
===========================================
- Hits         27355    27354       -1     
- Misses        7250     7256       +6     
Flag Coverage Δ
#django 72.66% <66.67%> (+0.01%) ⬆️
#sqlalchemy 71.85% <66.67%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
aiida/cmdline/commands/cmd_status.py 78.83% <66.67%> (+0.08%) ⬆️
aiida/orm/utils/log.py 76.67% <0.00%> (-16.66%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 377f137...1d6caa7. Read the comment docs.

Copy link
Member

@ltalirz ltalirz left a comment

Choose a reason for hiding this comment

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

thanks @sphuber !

@ltalirz ltalirz merged commit 5977dac into aiidateam:develop Aug 23, 2020
@sphuber sphuber deleted the fix/4282/verdi-status-database-outdated branch August 27, 2020 08:54
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.

verdi status does not check whether the database needs to be migrated
2 participants