This repository was archived by the owner on Oct 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
Add migration to turn parent_id column into bigint only if necessary
#554
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## master #554 +/- ##
==========================================
+ Coverage 58.85% 60.05% +1.19%
==========================================
Files 170 170
Lines 16068 13243 -2825
==========================================
- Hits 9457 7953 -1504
+ Misses 5777 4454 -1323
- Partials 834 836 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ions` table Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com>
Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com>
wild-endeavor
previously approved these changes
May 3, 2023
Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com>
wild-endeavor
approved these changes
May 8, 2023
wild-endeavor
pushed a commit
that referenced
this pull request
May 10, 2023
…ary (#554) * Add migration to turn `parent_id` column into `bigint` only if necessary Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * Migrations to handle the change of `parent_id` column in `node_executions` table Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * Add unit test Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * More coverage Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * Create index outside transaction Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> --------- Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> Co-authored-by: eduardo apolinario <eapolinario@users.noreply.github.com>
LaPetiteSouris
pushed a commit
to LaPetiteSouris/flyteadmin
that referenced
this pull request
May 16, 2023
…ary (flyteorg#554) * Add migration to turn `parent_id` column into `bigint` only if necessary Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * Migrations to handle the change of `parent_id` column in `node_executions` table Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * Add unit test Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * More coverage Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * Create index outside transaction Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> --------- Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> Co-authored-by: eduardo apolinario <eapolinario@users.noreply.github.com> Signed-off-by: TungHoang <sontunghoang@gmail.com>
eapolinario
added a commit
that referenced
this pull request
Sep 6, 2023
…ary (#554) * Add migration to turn `parent_id` column into `bigint` only if necessary Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * Migrations to handle the change of `parent_id` column in `node_executions` table Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * Add unit test Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * More coverage Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> * Create index outside transaction Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> --------- Signed-off-by: eduardo apolinario <eapolinario@users.noreply.github.com> Co-authored-by: eduardo apolinario <eapolinario@users.noreply.github.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
TL;DR
Migration to change parent_id type only if necessary
Type
Are all requirements met?
Complete description
This blog post has a suggestion on how to run a postgres migration to change a column type from int to bigint without a lot of downtime.
I turned that into two gorm migrations. And tested extensively both on sandbox and in a real production table in RDS. The happy path works, but more testing is needed.
Tracking Issue
Remove the 'fixes' keyword if there will be multiple PRs to fix the linked issue
fixes https://github.com/flyteorg/flyte/issues/
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/