feat: use workflows internal api with compression
What does this merge request do and why?
feat: use workflows internal api with compression
Workflow compression API reduces checkpoint size during transport
How to set up and validate locally
Test duo workflow with compression support
- On gitlab rails console (
bin/rails c) enable the feature:
Feature.enable :duo_workflow_compress_checkpoint
Check if the feature flag is enabled
Feature.enabled? :duo_workflow_compress_checkpoint
- restart the services and vscode (probably not needed, but to be sure)
gdk restart rails-web duo-workflow-service gitlab-ai-gateway
- In vscode local gdk test project, ask a question like
2+42? Get the workflow_id (for example 298)
In gitlab rails folder, you should see some entries in api log
tail -n 200 log/api_json.log | grep "/api/:version/ai/duo_workflows/workflows" | grep compress | grep 298 | jq
Re-Test duo workflow without compression support
Disable the feature flag above on bin/rails c
Feature.disable :duo_workflow_compress_checkpoint
Now for an agentic chat or a flow you should see no output in api_json.log for grepping "compress" for the newest workflow id.
Dependencies
- API MR Allow compressed checkpoints in Duo workflows i... (gitlab-org/gitlab!209257 - merged)
- feature flag Add feature flag for Duo Workflow checkpoint co... (gitlab-org/gitlab!209299 - merged)
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed. -
If this change requires executor implementation: verified that issues/MRs exist for both Go executor and Node executor or confirmed that changes are backward-compatible and don't break existing executor functionality.
Edited by Alper Akgun