Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COST-5124] Improve Trino migration management command (#5163)
* Add exponential backoff and logging to retries * Change log level to reflect severity * Explicit SQL alias for clarity * Catch and log exception instead of exiting * Add return type hints * Return if unsuccessful No point in verifying if the SQL did not run correctly * Fine tune exponential backoff * Create action class for adding/verifying columns were added * Assign default list using default_fatory Instead of doing it in the post_init, which get’s a little weird. * Add drop column action * Quote items in logs for better legibility * Consolidate action classes We lose some of the action-specific logging messages, but there is less code overall. I’m not sure how this scale to the action related to dropping. * Change local variable name No need to add a prefix to differentiate it from the parameter name. * Use a set to prevent running on the same schema multiple times Co-authored-by: Cody Myers <[email protected]>
- Loading branch information