-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add migrations for latest UserCode and CodeHistory #8985
Add migrations for latest UserCode and CodeHistory #8985
Conversation
@@ -1933,3 +1933,15 @@ def migrate_usercode_v5_to_v4() -> list[Callable]: | |||
drop("origin_node_side_type"), | |||
drop("l0_deny_reason"), | |||
] | |||
|
|||
|
|||
@migrate(UserCodeV5, UserCode) |
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.
NIT: could we delete UserCodeV4 from the codebase?
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.
and also its corresponding migrations.
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.
as since we need to maintain migrations for only last two versions.
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.
ya I can, but it kind of seems like bad practice in a way to lose the ability to migrate from old versions. Especially since all of these updates to UserCode are within such a short timeframe (V4 was just two weeks ago), migrations would be broken from UserCode from less than a month ago with this approach. Going to raise in slack since I think it would be good to understand why we do it this way.
@@ -1933,3 +1933,15 @@ def migrate_usercode_v5_to_v4() -> list[Callable]: | |||
drop("origin_node_side_type"), |
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.
Can we also add migrations for SubmitUserCode ?
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.
ya I can. I didn't see any migrate decorators in the codebase for any client-side code so that's why I wasn't sure, but it looks like we call migrations on all args and kwargs so I'll add.
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.
LGTM
- restage protocol
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.
LGTM !! Fixed changes to UserCode version
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.
Great work @BrendanSchell and @shubham3121
Description
Adds missing migrations from #8969 for UserCode and CodeHistory.
Affected Dependencies
List any dependencies that are required for this change.
How has this been tested?
Tested locally using
obj.migrate_to(version_no)
.Checklist