Repository: G-Research/fasttrackml
Pull request #837 (2024-01-29 03:44:15)

Bump gorm.io/gorm from 1.25.5 to 1.25.6
Bumps [gorm.io/gorm](https://github.com/go-gorm/gorm) from 1.25.5 to 1.25.6.
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/go-gorm/gorm/commit/0123dd45094295fade41e13550cd305eb5e3a848"><code>0123dd4</code></a> fix: ignore .gen.go suffix in logger to get the real caller when using gen <a href="https://redirect.github.com/go-gorm/gorm/issues/6">#6</a>...</li>
<li><a href="https://github.com/go-gorm/gorm/commit/940358e0ddd1e6d5e893184943a4fa71a0c28521"><code>940358e</code></a> Fix tests doesn't follow <a href="https://gorm.io/docs/method_chaining.html">https://gorm.io/docs/method_chaining.html</a> convention</li>
<li><a href="https://github.com/go-gorm/gorm/commit/87decced23be0ce21929fe393fc4fa3a936b1ec8"><code>87decce</code></a> fix: ExplainSQL using consecutive pairs of escaper in SQL string represents a...</li>
<li><a href="https://github.com/go-gorm/gorm/commit/436cca753cd784969a19477f022db4eb3d84f2ec"><code>436cca7</code></a> fix: join and select mytable.* not working (<a href="https://redirect.github.com/go-gorm/gorm/issues/6761">#6761</a>)</li>
<li><a href="https://github.com/go-gorm/gorm/commit/a2cac75218c9844d0b43832e2d2a3c35f9700406"><code>a2cac75</code></a> feature: bring custom type and id column name to polymorphism (<a href="https://redirect.github.com/go-gorm/gorm/issues/6716">#6716</a>)</li>
<li><a href="https://github.com/go-gorm/gorm/commit/b9ebdb13c777029c03aa5c6c1581f579cdf1f79a"><code>b9ebdb1</code></a> Making locking parameters more intuitive (<a href="https://redirect.github.com/go-gorm/gorm/issues/6719">#6719</a>)</li>
<li><a href="https://github.com/go-gorm/gorm/commit/2fb4928aa873bef89d016e0af2c0724b44725043"><code>2fb4928</code></a> refactor: Resolve implicit memory aliasing in for loop (<a href="https://redirect.github.com/go-gorm/gorm/issues/6730">#6730</a>)</li>
<li><a href="https://github.com/go-gorm/gorm/commit/f0af94cd167c03af78b80586f7628bc8fb470577"><code>f0af94c</code></a> add test to show that update from works</li>
<li><a href="https://github.com/go-gorm/gorm/commit/3207ad6033aad5e76c6c9d578ef663032765e484"><code>3207ad6</code></a> map insert support return increment id (<a href="https://redirect.github.com/go-gorm/gorm/issues/6662">#6662</a>)</li>
<li><a href="https://github.com/go-gorm/gorm/commit/c1e911f6ed8d3d929aebbd39985a33c9ebe3bad7"><code>c1e911f</code></a> Update tests/go.mod</li>
<li>Additional commits viewable in <a href="https://github.com/go-gorm/gorm/compare/v1.25.5...v1.25.6">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gorm.io/gorm&package-manager=go_modules&previous-version=1.25.5&new-version=1.25.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions


</details>

dsuhinin: @dependabot rebase

Patch:
diff --git a/go.mod b/go.mod
index 417df9c..30b1292 100644
--- a/go.mod
+++ b/go.mod
@@ -35,7 +35,7 @@ require (
 	google.golang.org/api v0.160.0
 	gorm.io/driver/postgres v1.5.4
 	gorm.io/driver/sqlite v1.4.3
-	gorm.io/gorm v1.25.5
+	gorm.io/gorm v1.25.6
 	gorm.io/plugin/dbresolver v1.5.0
 )
 
diff --git a/go.sum b/go.sum
index ec4afd3..ee1be2f 100644
--- a/go.sum
+++ b/go.sum
@@ -433,8 +433,8 @@ gorm.io/driver/sqlserver v1.4.1/go.mod h1:DJ4P+MeZbc5rvY58PnmN1Lnyvb5gw5NPzGshHD
 gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
 gorm.io/gorm v1.24.0/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
 gorm.io/gorm v1.25.2/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
-gorm.io/gorm v1.25.5 h1:zR9lOiiYf09VNh5Q1gphfyia1JpiClIWG9hQaxB/mls=
-gorm.io/gorm v1.25.5/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
+gorm.io/gorm v1.25.6 h1:V92+vVda1wEISSOMtodHVRcUIOPYa2tgQtyF+DfFx+A=
+gorm.io/gorm v1.25.6/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
 gorm.io/plugin/dbresolver v1.5.0 h1:XVHLxh775eP0CqVh3vcfJtYqja3uFl5Wr3cKlY8jgDY=
 gorm.io/plugin/dbresolver v1.5.0/go.mod h1:l4Cn87EHLEYuqUncpEeTC2tTJQkjngPSD+lo8hIvcT0=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/pkg/database/import.go b/pkg/database/import.go
index 60f2d4f..94b4d03 100644
--- a/pkg/database/import.go
+++ b/pkg/database/import.go
@@ -149,7 +149,7 @@ func (s *Importer) importTable(table string) error {
 				}
 				if err := destTX.
 					Table(table).
-					Clauses(clause.OnConflict{DoNothing: true}).
+					Clauses(clause.OnConflict{DoNothing: true}, clause.Returning{}).
 					Create(&item).Error; err != nil {
 					return eris.Wrap(err, "error creating destination row")
 				}


Test patch:
diff --git a/pkg/api/aim/query/query_test.go b/pkg/api/aim/query/query_test.go
index 1036f95..b5b9306 100644
--- a/pkg/api/aim/query/query_test.go
+++ b/pkg/api/aim/query/query_test.go
@@ -47,63 +47,63 @@ func (s *QueryTestSuite) TestPostgresDialector_Ok() {
 			name:  "TestRunNameWithoutFunction",
 			query: `(run.name == 'run')`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" = $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" = $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithInFunction",
 			query: `('run' in run.name)`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"%run%", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithNotInFunction",
 			query: `('run' not in run.name)`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" NOT LIKE $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" NOT LIKE $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"%run%", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithStartWithFunction",
 			query: `(run.name.startswith('run'))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"run%", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithEndWithFunction",
 			query: `(run.name.endswith('run'))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"%run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithRegexpMatchFunction",
 			query: `(re.match('run', run.name))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" ~ $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" ~ $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"^run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithRegexpSearchFunction",
 			query: `(re.search('run', run.name))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" ~ $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" ~ $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithNegatedRegexpMatchFunction",
 			query: `not (re.match('run', run.name))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" !~ $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" !~ $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"^run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithNegatedRegexpSearchFunction",
 			query: `not (re.search('run', run.name))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" !~ $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" !~ $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"run", models.LifecycleStageDeleted},
 		},
 		{
@@ -111,7 +111,7 @@ func (s *QueryTestSuite) TestPostgresDialector_Ok() {
 			query: `run.metrics['my_metric'].last < -1`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
 				`LEFT JOIN latest_metrics metrics_0 ON runs.run_uuid = metrics_0.run_uuid AND metrics_0.key = $1 ` +
-				`WHERE ("metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3)`,
+				`WHERE "metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3`,
 			expectedVars: []interface{}{"my_metric", -1, models.LifecycleStageDeleted},
 		},
 		{
@@ -119,7 +119,7 @@ func (s *QueryTestSuite) TestPostgresDialector_Ok() {
 			query: `run.metrics['my_metric'].last < -1.0`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
 				`LEFT JOIN latest_metrics metrics_0 ON runs.run_uuid = metrics_0.run_uuid AND metrics_0.key = $1 ` +
-				`WHERE ("metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3)`,
+				`WHERE "metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3`,
 			expectedVars: []interface{}{"my_metric", -1.0, models.LifecycleStageDeleted},
 		},
 		{
@@ -127,7 +127,7 @@ func (s *QueryTestSuite) TestPostgresDialector_Ok() {
 			query:         `metric.context.key1 == 'value1'`,
 			selectMetrics: true,
 			expectedSQL: `SELECT ID FROM "metrics" ` +
-				`WHERE ("contexts"."json"#>>$1 = $2 AND "runs"."lifecycle_stage" <> $3)`,
+				`WHERE "contexts"."json"#>>$1 = $2 AND "runs"."lifecycle_stage" <> $3`,
 			expectedVars: []interface{}{"{key1}", "value1", models.LifecycleStageDeleted},
 		},
 		{
@@ -135,7 +135,7 @@ func (s *QueryTestSuite) TestPostgresDialector_Ok() {
 			query:         `metric.context.key1 != 'value1'`,
 			selectMetrics: true,
 			expectedSQL: `SELECT ID FROM "metrics" ` +
-				`WHERE ("contexts"."json"#>>$1 <> $2 AND "runs"."lifecycle_stage" <> $3)`,
+				`WHERE "contexts"."json"#>>$1 <> $2 AND "runs"."lifecycle_stage" <> $3`,
 			expectedVars: []interface{}{"{key1}", "value1", models.LifecycleStageDeleted},
 		},
 		{
@@ -144,8 +144,8 @@ func (s *QueryTestSuite) TestPostgresDialector_Ok() {
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
 				`LEFT JOIN latest_metrics metrics_0 ON runs.run_uuid = metrics_0.run_uuid AND metrics_0.key = $1 ` +
 				`LEFT JOIN contexts contexts_1 ON metrics_0.context_id = contexts_1.id ` +
-				`WHERE ("contexts_1"."json"#>>$2 = $3 ` +
-				`AND ("metrics_0"."value" < $4 AND "runs"."lifecycle_stage" <> $5))`,
+				`WHERE "contexts_1"."json"#>>$2 = $3 ` +
+				`AND ("metrics_0"."value" < $4 AND "runs"."lifecycle_stage" <> $5)`,
 			expectedVars: []interface{}{"my_metric", "{key1}", "value1", -1, models.LifecycleStageDeleted},
 		},
 		{
@@ -153,8 +153,8 @@ func (s *QueryTestSuite) TestPostgresDialector_Ok() {
 			query: `run.metrics["my_metric"].last < -1 and metric.context.key1 == "value1"`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
 				`LEFT JOIN latest_metrics metrics_0 ON runs.run_uuid = metrics_0.run_uuid AND metrics_0.key = $1 ` +
-				`WHERE (("metrics_0"."value" < $2 AND "contexts"."json"#>>$3 = $4) ` +
-				`AND "runs"."lifecycle_stage" <> $5)`,
+				`WHERE ("metrics_0"."value" < $2 AND "contexts"."json"#>>$3 = $4) ` +
+				`AND "runs"."lifecycle_stage" <> $5`,
 			expectedVars: []interface{}{"my_metric", -1, "{key1}", "value1", models.LifecycleStageDeleted},
 		},
 	}
@@ -205,63 +205,63 @@ func (s *QueryTestSuite) TestSqliteDialector_Ok() {
 			name:  "TestRunNameWithoutFunction",
 			query: `(run.name == 'run')`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" = $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" = $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithInFunction",
 			query: `('run' in run.name)`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"%run%", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithNotInFunction",
 			query: `('run' not in run.name)`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" NOT LIKE $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" NOT LIKE $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"%run%", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithStartWithFunction",
 			query: `(run.name.startswith('run'))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"run%", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithEndWithFunction",
 			query: `(run.name.endswith('run'))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE ("runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE "runs"."name" LIKE $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"%run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithRegexpMatchFunction",
 			query: `(re.match('run', run.name))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE (IFNULL("runs"."name", '') REGEXP $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE IFNULL("runs"."name", '') REGEXP $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"^run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithRegexpSearchFunction",
 			query: `(re.search('run', run.name))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE (IFNULL("runs"."name", '') REGEXP $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE IFNULL("runs"."name", '') REGEXP $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithNegatedRegexpMatchFunction",
 			query: `not (re.match('run', run.name))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE (IFNULL("runs"."name", '') NOT REGEXP $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE IFNULL("runs"."name", '') NOT REGEXP $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"^run", models.LifecycleStageDeleted},
 		},
 		{
 			name:  "TestRunNameWithNegatedRegexpSearchFunction",
 			query: `not (re.search('run', run.name))`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
-				`WHERE (IFNULL("runs"."name", '') NOT REGEXP $1 AND "runs"."lifecycle_stage" <> $2)`,
+				`WHERE IFNULL("runs"."name", '') NOT REGEXP $1 AND "runs"."lifecycle_stage" <> $2`,
 			expectedVars: []interface{}{"run", models.LifecycleStageDeleted},
 		},
 		{
@@ -269,7 +269,7 @@ func (s *QueryTestSuite) TestSqliteDialector_Ok() {
 			query: `run.metrics['my_metric'].last < -1`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
 				`LEFT JOIN latest_metrics metrics_0 ON runs.run_uuid = metrics_0.run_uuid AND metrics_0.key = $1 ` +
-				`WHERE ("metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3)`,
+				`WHERE "metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3`,
 			expectedVars: []interface{}{"my_metric", -1, models.LifecycleStageDeleted},
 		},
 		{
@@ -277,7 +277,7 @@ func (s *QueryTestSuite) TestSqliteDialector_Ok() {
 			query: `run.metrics['my_metric'].last < -1.0`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
 				`LEFT JOIN latest_metrics metrics_0 ON runs.run_uuid = metrics_0.run_uuid AND metrics_0.key = $1 ` +
-				`WHERE ("metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3)`,
+				`WHERE "metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3`,
 			expectedVars: []interface{}{"my_metric", -1.0, models.LifecycleStageDeleted},
 		},
 		{
@@ -285,7 +285,7 @@ func (s *QueryTestSuite) TestSqliteDialector_Ok() {
 			query:         `metric.context.key1 == 'value1'`,
 			selectMetrics: true,
 			expectedSQL: `SELECT ID FROM "metrics" ` +
-				`WHERE (IFNULL("contexts"."json", JSON('{}'))->>$1 = $2 AND "runs"."lifecycle_stage" <> $3)`,
+				`WHERE IFNULL("contexts"."json", JSON('{}'))->>$1 = $2 AND "runs"."lifecycle_stage" <> $3`,
 			expectedVars: []interface{}{"key1", "value1", models.LifecycleStageDeleted},
 		},
 		{
@@ -293,7 +293,7 @@ func (s *QueryTestSuite) TestSqliteDialector_Ok() {
 			query:         `metric.context.key1 != 'value1'`,
 			selectMetrics: true,
 			expectedSQL: `SELECT ID FROM "metrics" ` +
-				`WHERE (IFNULL("contexts"."json", JSON('{}'))->>$1 <> $2 AND "runs"."lifecycle_stage" <> $3)`,
+				`WHERE IFNULL("contexts"."json", JSON('{}'))->>$1 <> $2 AND "runs"."lifecycle_stage" <> $3`,
 			expectedVars: []interface{}{"key1", "value1", models.LifecycleStageDeleted},
 		},
 		{
@@ -301,7 +301,7 @@ func (s *QueryTestSuite) TestSqliteDialector_Ok() {
 			query: `run.metrics["key1"].last < -1`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
 				`LEFT JOIN latest_metrics metrics_0 ON runs.run_uuid = metrics_0.run_uuid AND metrics_0.key = $1 ` +
-				`WHERE ("metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3)`,
+				`WHERE "metrics_0"."value" < $2 AND "runs"."lifecycle_stage" <> $3`,
 			expectedVars: []interface{}{"key1", -1, models.LifecycleStageDeleted},
 		},
 		{
@@ -310,8 +310,8 @@ func (s *QueryTestSuite) TestSqliteDialector_Ok() {
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
 				`LEFT JOIN latest_metrics metrics_0 ON runs.run_uuid = metrics_0.run_uuid AND metrics_0.key = $1 ` +
 				`LEFT JOIN contexts contexts_1 ON metrics_0.context_id = contexts_1.id ` +
-				`WHERE (IFNULL("contexts_1"."json", JSON('{}'))->>$2 = $3 ` +
-				`AND ("metrics_0"."value" < $4 AND "runs"."lifecycle_stage" <> $5))`,
+				`WHERE IFNULL("contexts_1"."json", JSON('{}'))->>$2 = $3 ` +
+				`AND ("metrics_0"."value" < $4 AND "runs"."lifecycle_stage" <> $5)`,
 			expectedVars: []interface{}{"my_metric", "key1", "value1", -1, models.LifecycleStageDeleted},
 		},
 		{
@@ -319,8 +319,8 @@ func (s *QueryTestSuite) TestSqliteDialector_Ok() {
 			query: `run.metrics["my_metric"].last < -1 and metric.context.key1 == "value1"`,
 			expectedSQL: `SELECT "run_uuid" FROM "runs" ` +
 				`LEFT JOIN latest_metrics metrics_0 ON runs.run_uuid = metrics_0.run_uuid AND metrics_0.key = $1 ` +
-				`WHERE (("metrics_0"."value" < $2 AND IFNULL("contexts"."json", JSON('{}'))->>$3 = $4) ` +
-				`AND "runs"."lifecycle_stage" <> $5)`,
+				`WHERE ("metrics_0"."value" < $2 AND IFNULL("contexts"."json", JSON('{}'))->>$3 = $4) ` +
+				`AND "runs"."lifecycle_stage" <> $5`,
 			expectedVars: []interface{}{"my_metric", -1, "key1", "value1", models.LifecycleStageDeleted},
 		},
 	}