-
Notifications
You must be signed in to change notification settings - Fork 71
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
Fixes #28943 - pre-upgrade check to validate external DB version #322
Fixes #28943 - pre-upgrade check to validate external DB version #322
Conversation
Issues: #28943 |
1 similar comment
Issues: #28943 |
Issues: #28943 |
189c2b0
to
0262853
Compare
def db_upgrade_message(db_version) | ||
"\n\n*** WARNING: Server is running on PostgreSQL #{db_version}.\n"\ | ||
"*** Before performing the upgrade, please upgrade your database to PostgreSQL (>=12)\n"\ | ||
"*** otherwise data will be lost.\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean we still support old pgsql and repercussion is data loss only ? If we are not going to support the old version then message should be modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@upadhyeammit, @ehelms, any suggestion on this warning message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, this is not a skill-able step. So I think it's ok for our language to be a bit stronger. The user must upgrade to Postgres 12 before continuing the upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-phrased the warning message. Adding console output for reference:
================================================================================
Make sure server is running on required database version: [FAIL]
*** WARNING: Server is running on PostgreSQL 9.2.24 DB.
*** Targetted Satellite does not support PostgreSQL versions less than 12.
*** Before proceeding further, make sure you must upgrade database to PostgreSQL (>=12).
--------------------------------------------------------------------------------
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding console output for reference:
================================================================================
Make sure server is running on required database version: [FAIL]
*** WARNING: Server is running on PostgreSQL 9.2.24 DB.
*** Newer version of Satellite supports only PostgreSQL version 12 or above.
*** Before proceeding further, make sure you must upgrade database to PostgreSQL (>=12).
--------------------------------------------------------------------------------
4287f6b
to
7384990
Compare
def db_upgrade_message(db_version) | ||
product_name = feature(:instance).product_name | ||
|
||
"\n\n*** WARNING: Server is running on PostgreSQL #{db_version} DB.\n"\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this should be ERROR
since warnings tend to indicate something that a user should heed but is not fatal.
7384990
to
6cb2b89
Compare
|
||
"\n\n*** ERROR: Server is running on PostgreSQL #{db_version} DB.\n"\ | ||
"*** Newer version of #{product_name} supports only PostgreSQL version 12 or above.\n"\ | ||
"*** Before proceeding further, make sure you must upgrade database to PostgreSQL (>=12).\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/make sure you must/you must upgrade your database/
product_name = feature(:instance).product_name | ||
|
||
"\n\n*** ERROR: Server is running on PostgreSQL #{db_version} DB.\n"\ | ||
"*** Newer version of #{product_name} supports only PostgreSQL version 12 or above.\n"\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I didn't notice this before. There is no above in this scenario, there is only support for PostgreSQL version 12.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed! Example output:
================================================================================
Make sure server is running on required database version: [FAIL]
*** ERROR: Server is running on PostgreSQL 9.2.24 database.
*** Newer version of Satellite supports only PostgreSQL version 12.
*** Before proceeding further, you must upgrade database to PostgreSQL 12.
6cb2b89
to
bb9d2e6
Compare
bb9d2e6
to
3f9d18a
Compare
Thank you @ehelms and @upadhyeammit. |
No description provided.