-
Notifications
You must be signed in to change notification settings - Fork 41
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
Remove usage of method placeholder functions #2364
Remove usage of method placeholder functions #2364
Conversation
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.
lovely! did we decide to not backfill method metadata on existing classes in order to remove existing placeholders? (completely understandable, seems messy).
Another related question:
Will "forward" lookups work after this? I.e. can a 0.63 client .lookup()
a 0.67 class? The way I understand the ClassGet backend implementation the answer is yes, since it "mocks out" placeholders with the function id set to the class service function?
@freider yes, forward lookups will work, excluding lookups from a re: your first question, yea it feels a bit messy. i'm guessing i would have to have the server modify the class service function definitions coming from older clients to include the method definitions mapping and that will likely introduce more confusion |
@prbot approve |
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.
Approved 👍. @mwaskom will follow-up review this.
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.
I know this mostly involves internal changes but is there anything we should put in a public changelog here? Users will see the version bump and wonder what's non-compatible.
I left a few other comments but mostly Python trivia that you don't need to address.
This change is touching some very complicated stuff and I didn't fully pore through all the details, as I trust you've exercised it thoroughly in your testing. LMK if you'd feel more comfortable with me doing that before you merge.
This PR introduces a new minor client version
0.67.x
that does not create method placeholder functions for modal classes.I've tested all forward lookup scenarios (
.lookup()
of a0.67
class from a pre0.67
client) as well as backwards lookup scenarios (.lookup()
of a pre0.67
class from a0.67
client) and all work, except for a0.62
client looking up a0.67
class, which will be explicitly not supported (this maintains our current restriction of not being able to lookup a0.63+
class from a0.62
client).Changelog
New minor client version
0.67.x
comes with an internal data model change for how Modal creates functions for Modal classes. There are no breaking or backwards-incompatible changes with this new minor version. All forward lookup scenarios (.lookup()
of a0.67
class from a pre0.67
client) as well as backwards lookup scenarios (.lookup()
of a pre0.67
class from a0.67
client) work, except for a0.62
client looking up a0.67
class (this maintains our current restriction of not being able to lookup a0.63+
class from a0.62
client).