fix: send nested request body for workflow config set - #10
Draft
anamhira47 wants to merge 1 commit into
Draft
Conversation
The CLI was sending a flat body to the update_run_config endpoint:
{"parallelism": 3, "max_retries": 1}
But the backend expects a nested structure:
{"run_config": {"parallelism": 3, "max_retries": 1}, "override_run_config": true}
Changes:
- Update UpdateWorkflowRunConfig to accept an override parameter and wrap
the body in the expected nested structure (consistent with sibling methods
like UpdateWorkflowLocationConfig and UpdateWorkflowBuildConfig)
- Add OverrideRunConfig field to Workflow struct for consistency
- Update CLI caller to pass override=true when setting config
- Update TUI caller to pass the workflow's OverrideRunConfig value
Fixes REV-377
Co-authored-by: Anam Hira <anam@revyl.ai>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Fixes REV-377: CLI
workflow config setcommand was failing with validation error:Problem
The CLI was sending a flat request body to
/api/v1/workflows/update_run_config/{workflow_id}:{"parallelism": 3, "max_retries": 1}But the backend expects a nested structure:
{"run_config": {"parallelism": 3, "max_retries": 1}, "override_run_config": true}Solution
Updated
UpdateWorkflowRunConfigininternal/api/client.goto:override boolparameter (consistent with sibling methods likeUpdateWorkflowLocationConfigandUpdateWorkflowBuildConfig)run_configandoverride_run_configfieldsAlso updated all callers:
cmd/revyl/workflow_settings.go) - passesoverride=trueinternal/tui/workflow_mgmt.go) - passeswf.OverrideRunConfigAdded
OverrideRunConfigfield to theWorkflowstruct for consistency with other config types.Testing
revyl workflow config set <workflow> --parallel 3 --retries 1will now send the correct nested body structureLinear Issue: REV-377