Skip to content
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

Standardize the cached Constraint results to match action results #1156

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ static JsonParser<SpansSelectWhenTrue> spansSelectWhenTrueF(JsonParser<Expressio

public static final JsonParser<Violation> violationP =
productP
.field("violationWindows", listP(intervalP))
.field("windows", listP(intervalP))
.field("activityInstanceIds", listP(longP))
.map(
untuple(Violation::new),
Expand All @@ -310,8 +310,8 @@ static JsonParser<SpansSelectWhenTrue> spansSelectWhenTrueF(JsonParser<Expressio
productP
.field("violations", listP(violationP))
.field("gaps", listP(intervalP))
.field("constraintType", enumP(ConstraintType.class, Enum::name))
.field("resourceNames", listP(stringP))
.field("type", enumP(ConstraintType.class, Enum::name))
.field("resourceIds", listP(stringP))
.field("constraintId", longP)
.field("constraintName", stringP)
.map(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- The JSON schema of the constraint violations in constraint_run is changed.
-- Because the table is a cache it is safer to clear it than to attempt to transform it using SQL
truncate constraint_run;
call migrations.mark_migration_rolled_back('29');
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-- The JSON schema of the constraint violations in constraint_run is changed.
-- Because the table is a cache it is safer to clear it than to attempt to transform it using SQL
truncate constraint_run;
call migrations.mark_migration_applied('29');
1 change: 1 addition & 0 deletions merlin-server/sql/merlin/applied_migrations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ call migrations.mark_migration_applied('25');
call migrations.mark_migration_applied('26');
call migrations.mark_migration_applied('27');
call migrations.mark_migration_applied('28');
call migrations.mark_migration_applied('29');
Loading