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

Set Function's local ID on creation from remote schema #33

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

alexpearce
Copy link
Contributor

Uploading a Pipeline looks like:

  1. Upload the Function objects.
  2. Replace the local_id of each Function object with the remote ID.
  3. Upload the some other objects (Model and Variable).
  4. Create schemas from the remaining objects (GraphNode and output Variable)
  5. Create and push a Pipeline schema.

I think there is a bug when resurrecting a Pipeline. The graph nodes will contain the remote Function IDs thanks to step 2 above, however the Function objects resurrected from the schemas will not have the remote ID as they are uploaded before the replacement. This causes the function search to fail because _node.function is a remote ID whereas _func.local_id is a local one.

This PR is one possible fix: when resurrecting a Function from a schema, override the deserialised local_id with the (remote!) ID included in the schema.

@alexpearce alexpearce requested a review from paulcjh January 31, 2022 12:56
@alexpearce alexpearce merged commit 256c5eb into main Jan 31, 2022
@alexpearce alexpearce deleted the alexpearce/function-id-update branch January 31, 2022 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants