feat(graph-engine): add command to update variables at runtime#30563
feat(graph-engine): add command to update variables at runtime#30563
Conversation
Add a new command for GraphEngine to update a group of variables. This command takes a group of variable selectors and new values. When the engine receives the command, it will update the corresponding variable in the variable pool. If it does not exist, it will add it; if it does, it will overwrite it. Both behaviors should be treated the same and do not need to be distinguished.
…n and remove value type validation - test(graph-engine): update UpdateVariablesCommand tests to pass concrete Variable instances - fix(graph-engine): align VariableUpdate values with selector before adding to VariablePool Tests not run.
… pool updates from Variable.selector, updating tests accordingly
…ion in update handler
Summary of ChangesHello @laipz8200, 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 introduces the capability to dynamically update variables within a running workflow. By adding a new Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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.
Code Review
This pull request introduces a new update_variables command to the workflow engine, allowing for dynamic variable updates during execution. The implementation is well-structured, touching upon command definition, Redis channel handling, command processing, and engine integration. The changes are accompanied by comprehensive unit and integration tests, ensuring the new functionality is robust. I have one suggestion to simplify the code in the new command handler.
api/core/workflow/graph_engine/command_processing/command_handlers.py Outdated Show resolved Hide resolved
…lers.py Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Important
Fixes #<issue number>.Summary
Adds a new GraphEngine command to update variables at runtime, wiring it through the Redis command channel, manager API, and command handler. Includes unit tests covering command serialization and variable pool updates. Fixes #30562.
Screenshots
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods