-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
fix: openapi stuff #6454
Merged
Merged
fix: openapi stuff #6454
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: the vast majority of the diff is regenerated types. |
ebr
reviewed
May 29, 2024
hipsterusername
approved these changes
May 30, 2024
blessedcoolant
approved these changes
May 30, 2024
f371271
to
85a95b4
Compare
Some tech debt related to dynamic pydantic schemas for invocations became problematic. Including the invocations and results in the event schemas was breaking pydantic's handling of ref schemas. I don't really understand why - I think it's a pydantic bug in a remote edge case that we are hitting. After many failed attempts I landed on this implementation, which is actually much tidier than what was in there before. - Create pydantic-enabled types for `AnyInvocation` and `AnyInvocationOutput` and use these in place of the janky dynamic unions. Actually, they are kinda the same, but better encapsulated. Use these in `Graph`, `GraphExecutionState`, `InvocationEventBase` and `InvocationCompleteEvent`. - Revise the custom openapi function to work with the new models. - Split out the custom openapi function to a separate file. Add a `post_transform` callback so consumers can customize the output schema. - Update makefile scripts.
Reduces the constant changes to the frontend client types due to inconsistent ordering of pydantic models.
Keep track of whether or not the typeadapter needs to be updated. Allows for dynamic invocation and output unions.
This fixes the tests and slightly changes output types.
85a95b4
to
a983f27
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
frontend
PRs that change frontend files
invocations
PRs that change invocations
python
PRs that change python files
python-deps
PRs that change python dependencies
python-tests
PRs that change python tests
Root
services
PRs that change app services
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Fix some issues with openapi schema generation. See commits for details.
Related Issues / Discussions
https://discord.com/channels/1020123559063990373/1049495067846524939/1245141831394529352
QA Instructions
App should work, workflows should work.
Merge Plan
n/a
Checklist