Move PG version check to awx-manage
check_db
& migrate
commands
#15463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SUMMARY
Similar to #15338, this is an action I very strongly want to get out of the
__init__.py
for management commands, which basically runs for every single thing we run.The consequences of having it there go further than just performance. It causes us to open up a connection unexpectedly, whereas otherwise we wouldn't have. I saw this back when we were trying to improve our connection management, but changing, by nature, is opinionated.
By doing this, we would be shifting the burden to installers of AWX to assure that, if an external database is used, it must meet the minimum version. That can be done by:
awx-manage check_db
, which is not unreasonable, since installers already have to run a ton of management commandsBecause this is asking some of installers, I expect it will be more difficult to get in than 15338, which is why I'm keeping it separate.
ISSUE TYPE
COMPONENT NAME