Loading
Add flow_metadata_json to workflows
What does this MR do and why?
Add flow_metadata_json to workflows. Adds a new field that can contain flow information for the flow that was actually run. This is required because flow_version resolution happens on the AI Gateway.
Also added a model-level validation to the existing model_metadata_json field, which matches the DB constraints.
References
How to set up and validate locally
Update Database
bundle exec rails db:migrate:up:main VERSION=20260713115338 Testing flow data being saved:
- Check out this branch on your AIGW: gitlab-org/modelops/applied-ml/code-suggestions/ai-assist!6210 (merged)
gdk restart duo-workflow-service- Run database migration above
- Run a
developerflow - Confirm the resolved version was set:
pry(main)> Ai::DuoWorkflows::Workflow.last.flow_metadata_json
...
=> "{\"flow_version\": \"2.0.0\", \"schema_version\": \"v1\", \"flow_id\": \"developer\"}"Cleanup
- Undo database migration
bundle exec rails db:migrate:down:main VERSION=20260713115338MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Roman Eisner