-
Notifications
You must be signed in to change notification settings - Fork 247
Feat: OLAP Table for CEL Eval Failures #2012
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a new OLAP table and end‐to‐end plumbing to record CEL (Common Expression Language) evaluation failures.
- Introduce a new enum and partitioned
v1_cel_evaluation_failures
table with accompanying migration - Extend the trigger repository to collect failures and persist them via a new
StoreCELEvaluationFailures
method - Wire up message payloads and controllers to publish and consume CEL failure events into OLAP
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
sql/schema/v1-olap.sql | Define new v1_cel_evaluation_failures enum and table partitions |
pkg/repository/v1/trigger.go | Capture and return CEL evaluation failures in TriggerFromEvents |
pkg/repository/v1/sqlcv1/olap.sql.go | Update partition function and add StoreCELEvaluationFailures SQL |
pkg/repository/v1/sqlcv1/olap.sql | Add SQLC definitions for partitioning and store failures query |
pkg/repository/v1/sqlcv1/models.go | Add enum, null wrapper, and model struct for CEL failure source |
pkg/repository/v1/olap.go | Define CELEvaluationFailure type, interface, and implementation |
internal/services/shared/tasktypes/v1/olap.go | Define CELEvaluationFailures message payload |
internal/services/controllers/v1/task/controller.go | Publish CEL failures to message queue |
internal/services/controllers/v1/olap/controller.go | Consume CEL failures messages and persist to OLAP |
cmd/hatchet-migrate/migrate/migrations/20250716183217_v1_0_29.sql | Goose migration for failure table |
Comments suppressed due to low confidence (5)
pkg/repository/v1/sqlcv1/olap.sql.go:2346
- Field
Tenantid
should beTenantID
to follow Go's convention for initialisms (and update JSON tag to"tenant_id"
).
Tenantid pgtype.UUID `json:"tenantid"`
pkg/repository/v1/olap.go:236
- Exported interface method missing a doc comment; please add a comment explaining what
StoreCELEvaluationFailures
does and its failure conditions.
StoreCELEvaluationFailures(ctx context.Context, tenantId string, failures []CELEvaluationFailure) error
pkg/repository/v1/olap.go:1693
- New persistence logic for CEL failures lacks accompanying unit or integration tests; consider adding tests to validate that failures are correctly stored.
func (r *OLAPRepositoryImpl) StoreCELEvaluationFailures(ctx context.Context, tenantId string, failures []CELEvaluationFailure) error {
internal/services/shared/tasktypes/v1/olap.go:16
- Unresolved package alias
v1
; this should reference the actual import alias (e.g.,sqlcv1.CELEvaluationFailure
) or alias the package correctly.
Failures []v1.CELEvaluationFailure
internal/services/shared/tasktypes/v1/olap.go:19
- Function signature uses
v1.CELEvaluationFailure
but the package is imported assqlcv1
; update to[]sqlcv1.CELEvaluationFailure
or alias the import asv1
.
func CELEvaluationFailureMessage(tenantId string, failures []v1.CELEvaluationFailure) (*msgqueue.Message, error) {
56fdfda
to
3fef74e
Compare
Description
Adding a table in the OLAP db for temporarily storing CEL evaluation failures + wiring up writes. We can also add this to the debug endpoint + webhooks once it merges
Will need to update the webhooks + debug endpoint PRs once this goes in
Type of change