Add version pinning to enabled items (backend)
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
There is a corresponding frontend issue Add version upgrade check and option for agents... (#578590).
About
We will complete a minimal iteration of versioning that will automatically version pin items for everyone except the owners of the items. See related issues.
Proposal
Automatically version pin AI Catalog items to its specific latest version when they are added to a project/group - except when enabling for the project that owns the AI Catalog item. This is because AI Catalog items enabled by the same project that owns it can trust themselves - and allows them to create a private item for their use, and always be using the latest version whenever it is updated.
Update customer documentation with this information.
Technical proposal
Overview:
- Automatically create item consumers pinned at the latest version unless we're creating for the owner project
- Allow updating item consumer to be pinned to latest version only (but do not automatically do it)
Details:
In ItemConsumers::CreateService, automatically set pinned_version_prefix to the latest released version of the AI Catalog item unless the project that owns the item is the target for the ItemConsumer (i.e., only the project that created an AI Catalog item will use the latest version). So, if the latest released version is 1.5.0, we will automatically set the pinned_version_prefix to that value.
ItemConsumers::CreateService should return an error message if pinned_version_prefix argument is provided and it is not the latest version of the item. This is for the benefit of people using our the GraphQL mutation directly.