Skip to content

Commit

Permalink
[COST-5124] Improve Trino migration management command (#5163)
Browse files Browse the repository at this point in the history
* 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
samdoran and myersCody authored Jun 21, 2024
1 parent a75fd52 commit 5c332d4
Showing 1 changed file with 223 additions and 125 deletions.
Loading

0 comments on commit 5c332d4

Please sign in to comment.