Add AI ActiveContext collection table
What does this MR do and why?
Adds a new table for keeping a record of collections created by the ActiveContext gem. The table has the following structure:
Table "public.ai_active_context_collections"
Column | Type | Collation | Nullable | Default
----------------------+--------------------------+-----------+----------+-----------------------------------------------------------
id | bigint | | not null | nextval('ai_active_context_collections_id_seq'::regclass)
name | text | | not null |
metadata | jsonb | | not null | '{}'::jsonb
number_of_partitions | integer | | not null | 1
created_at | timestamp with time zone | | not null |
updated_at | timestamp with time zone | | not null |
Indexes:
"ai_active_context_collections_pkey" PRIMARY KEY, btree (id)
Check constraints:
"check_fe84a77f95" CHECK (char_length(name) <= 255)
We will create a record when a collection is created in #517932 (closed). This MR only creates the relation.
An example record looks like:
id: 1, name: "MergeRequest", metadata: {}, number_of_partitions: 3
References
Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.
- https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/ai_context_abstraction_layer/#tracking-the-state-of-the-collection
- https://www.figma.com/board/7ZukyJ4vtN8LbNPZOogv90/AI-Context-Abstraction-Layer?node-id=55-1279&t=smIylR8lXtDvSvCV-4
- #517046 (closed)
MR acceptance checklist
Please 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 #517046 (closed)
Edited by Madelein van Niekerk