Skip to content

Handle apply errors #1806

@gugu

Description

@gugu

Sometimes SQL is not valid after generation, example:

Batch 416256c6-27cd-448f-aade-92a981f5e723 failed at order 7 (changeId=218fdbc6-4a0b-40b0-ba2d-53b32acc969a): CREATE INDEX idx_lookup_cache_expires ON lookup_cache(expires_at) WHERE expires_at > CURRENT_TIMESTAMP - functions in index predicate must be marked IMMUTABLE. Rolled back 7 earlier item(s): 82884843-d7dd-4830-bbd1-b39e6030c40d, 15bfaffd-5f7e-41e0-a8ba-3cf31ad69f81, 50f22317-036e-4f2f-b104-551018286bc7, 4ec99785-5f11-421f-82e5-9ef1b3fb3766, c126a4f2-7c92-4979-8b74-4d197c43c0c5, 83354304-a202-47b1-ac77-d8d2c32f1cce, e9b22650-615d-4307-b30a-32ec5f38723e.

We need to:

  1. Add "validate SQL" step after each generation
  2. Error message should be sent to AI agent back and plan needs to be altered
  3. Ensure whole plan is executed in one transaction

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions