-
Notifications
You must be signed in to change notification settings - Fork 20k
feat: start node support json schema #29053
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
Conversation
Summary of ChangesHello @fatelei, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the flexibility and robustness of workflow inputs by enabling the 'start node' to accept and validate JSON objects. This feature allows users to define structured data inputs for their workflows, which are then automatically validated against a specified JSON Schema, improving data quality and reducing potential errors at the workflow's entry point. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
This pull request adds support for JSON object variables in the start node, including validation against a JSON schema. The changes in the backend are well-structured, introducing a new JSON_OBJECT variable type and implementing the validation logic in the StartNode. The addition of a new dependency jsonschema is appropriate.
My review focuses on improving the code clarity and test coverage. I've suggested refactoring a small part of the validation logic to remove unreachable code and translating Chinese comments to English for consistency. Most importantly, I've recommended adding more comprehensive test cases to cover various edge cases and error scenarios, which will make the new feature more robust.
Overall, this is a good feature addition. Addressing the feedback will improve the quality and maintainability of the code.
api/tests/unit_tests/core/workflow/nodes/test_start_node_json_object.py
Outdated
Show resolved
Hide resolved
83e7681 to
d048698
Compare
d048698 to
ce83e0e
Compare
QuantumGhost
left a comment
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.
This also requires updating to documentation.
Other changes LGTM.
ce83e0e to
29fb185
Compare
Important
Fixes #<issue number>.Summary
resolve #29052, start node support json
Screenshots
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods