Skip to content
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

Merged

Conversation

BrendanSchell
Copy link
Contributor

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

@@ -1933,3 +1933,15 @@ def migrate_usercode_v5_to_v4() -> list[Callable]:
drop("origin_node_side_type"),
drop("l0_deny_reason"),
]


@migrate(UserCodeV5, UserCode)
Copy link
Collaborator

@rasswanth-s rasswanth-s Jun 28, 2024

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?

Copy link
Collaborator

@rasswanth-s rasswanth-s Jun 28, 2024

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.

Copy link
Collaborator

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.

Copy link
Contributor Author

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"),
Copy link
Collaborator

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 ?

Copy link
Contributor Author

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.

Copy link
Contributor

@snwagh snwagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@madhavajay madhavajay added this to the 24Q3 - G1M1 milestone Jul 1, 2024
Copy link
Member

@shubham3121 shubham3121 left a 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

Copy link
Collaborator

@rasswanth-s rasswanth-s left a 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

@shubham3121 shubham3121 merged commit d995307 into dev Jul 2, 2024
26 checks passed
@shubham3121 shubham3121 deleted the bschell/add-migrations-for-old-enclave-code-removal branch July 2, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants