Support fetching specific agent/flow versions

Replaced by:

Add pinnedItemVersion field to catalog GraphQL ... (!213420 - merged)

Add version pinning logic in explore/project ar... (!213429 - merged)

Add version pinning logic in explore/project ar... (!213458 - merged)

Add version tag to metadata component (!213467 - merged)


See old MR

What does this MR do and why?

This allows the user to see the version of agent or flow that is currently configured and enabled for their project, and make sure that the version numbers as seen within the project scope are the pinned versions that were set when the agent or flow was enabled by a group level owner.

References

Screenshots or screen recordings

Before After

How to set up and validate locally

  1. Make sure to have a duo enabled project with the global_ai_catalog feature flag enabled
  2. In the AI catalog, create a new agent.
    • You should see version v1.0.0 in the metadata section of the agent’s details page
  3. Update that same agent
    • You should now see version v1.1.0
  4. Enable this agent in a duo enabled project
  5. Navigate to that project’s Automate > Agents page and click on the agent you created
    • You should see that the version has been pinned to v1.1.0
  6. Navigate back to the Explorer area and make an update to that agent
    • You should see that it's version has been bumped to v1.2.0
  7. Navigate back to that same agent in your duo enable and click on it to see its details
    • You should see that it's version is still pinned to v1.1.0
  8. Open up a rails console and update the pinned version of the agent you've been working with to v1.2.0

Ai::Catalog::ItemConsumer.last.update!(pinned_version_prefix: '1.2.0')

  1. Reload the project level agent page
    • You should see that the version has changed to the version you used in the rails console.

You can perform all these sam steps to test flows as well.

Note that all group-level agents and flows, as well as the items within the "Managed" tab inside of a project, will show the latest version. These will come with another MR.

MR 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.

Related to #580382 (closed)

Edited by Angus Ryer

Merge request reports

Loading