Draft: Add model layer for AI Catalog object storage

What does this MR do and why?

Part 3 of the AI Catalog object storage MR split. !227895

Adds the model layer changes to support storing YAML definitions in object storage.

Key changes:

  • Mount YamlDefinitionUploader on ItemVersion
  • Add transparent yaml_definition accessor that reads from object storage when yaml_definition_file is present
  • Add cleanup_version_files callback on Item destroy
  • Add yaml_definition_file_store attribute and before_save callback
  • Make definition validation conditional on feature flag
  • Add specs for yaml_definition fallback and file cleanup

MR Breakdown Plan

MR Description Dependencies
1a Add yaml_definition_file columns to ai_catalog_... (!228120 - merged) None
1b Add ai_catalog object storage configuration and... (!228122 - merged) None
2 Add YamlDefinitionUploader for AI Catalog YAML ... (!228839 - merged) 1b
3 (This MR) Model layer: Mount uploader, add transparent accessor 1a, 2
4 Service layer & schema: Upload in services, make yaml_definition optional 3

Issue: #591638

Edited by Sam Beckham

Merge request reports

Loading