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

Only check if returned object ID is different from existing_object_id for functions #2580

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

devennavani
Copy link
Contributor

Only check if returned object ID is different from existing_object_id for functions.

Currently only functions and classes use existing_object_id in function/class creation RPCs.

After the server-side fix here, ID of an existing class might change if the set of methods of the class change.

existing function IDs should not change because the way we modify functions is by assigning them a new definition id

@devennavani
Copy link
Contributor Author

@prbot approve

Copy link

@modal-pr-review-automation modal-pr-review-automation bot left a comment

Choose a reason for hiding this comment

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

Approved 👍. @freider will follow-up review this.

@devennavani devennavani merged commit 2903bbe into main Nov 27, 2024
22 checks passed
@devennavani devennavani deleted the deven/dont_check_class_id branch November 27, 2024 04:01
@freider
Copy link
Contributor

freider commented Nov 28, 2024

👍

if (
not obj._is_another_app
and existing_object_id is not None
and existing_object_id.startswith("fu-")
Copy link
Contributor

Choose a reason for hiding this comment

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

There's a helper function for this, see the _object base class!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants