Backend: Send Agent data from Rails to Workflow Service using new dynamic flow and agent data structure
About
We want to be able to build a flow with agents as data to be sent to Workflow Service.
When someone creates a flow/agent for their project/group from something in the catalog, they are referencing it at a particular version.
They "pin" their flow/agent to a particular version, meaning, they specify that they want to continue to use the "latest" or anything in a major, minor, or patch version.
In these scenarios, when building the flow, we will automatically resolve to the latest flow/agent at the pinned version.
Proposal
Write a class to build the data
We should write a class that will build the data.
In future, if Workflow Service expects certain changes to the structure that we can adapt in backend code, this class will continue to function as an adapter.
Validate schema of data
gitlab-com/content-sites/handbook!14450 (comment 2630110586)
Send to Workflow Service
Send the data to Workflow Service https://gitlab.com/gitlab-org/modelops/applied-ml/code-suggestions/ai-assist/-/issues/1270
Event tracking
We want to track whenever a flow is executed (see !198512 (merged) for pattern to follow).