Skip to content

Commit

Permalink
qe: Fix CI failures (#4714)
Browse files Browse the repository at this point in the history
  • Loading branch information
SevInf authored Feb 9, 2024
1 parent c3c9c6a commit 925d1bf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 29 deletions.
1 change: 1 addition & 0 deletions query-engine/driver-adapters/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lockfile = false
2 changes: 1 addition & 1 deletion query-engine/driver-adapters/executor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"license": "Apache-2.0",
"dependencies": {
"@libsql/client": "0.3.6",
"@neondatabase/serverless": "0.7.2",
"@neondatabase/serverless": "0.8.1",
"@planetscale/database": "1.15.0",
"query-engine-wasm-latest": "npm:@prisma/query-engine-wasm@latest",
"query-engine-wasm-baseline": "npm:@prisma/[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion query-engine/driver-adapters/executor/src/bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { QueryEngine as WasmBaseline } from "query-engine-wasm-baseline";
// `query-engine-wasm-latest` refers to the latest published version of the Wasm Query Engine,
// rather than the latest locally built one. We're pulling in the Postgres Query Engine
// because benchmarks are only run against a Postgres database.
import { QueryEngine as WasmLatest } from "query-engine-wasm-latest/postgresql/query_engine";
import { QueryEngine as WasmLatest } from "query-engine-wasm-latest/postgresql/query_engine.js";

if (!global.crypto) {
(global as any).crypto = webcrypto;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ fn failing_migration_after_migration_dropping_data(api: TestApi) {
"#,
];
let dir = write_migrations(migrations);
let err = api.apply_migrations(&dir).send_unwrap_err().to_string();
let err = api.apply_migrations(&dir).send_unwrap_err();
let expectation = expect![[r#"
A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
Expand All @@ -39,14 +39,8 @@ fn failing_migration_after_migration_dropping_data(api: TestApi) {
ERROR: column "is_good_dog" does not exist
DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E42703), message: "column \"is_good_dog\" does not exist", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("column_resolver.go"), line: Some(196), routine: Some("NewUndefinedColumnError") }
0: sql_schema_connector::apply_migration::apply_script
with migration_name=" 2"
at schema-engine/connectors/sql-schema-connector/src/apply_migration.rs:106
1: schema_core::commands::apply_migrations::Applying migration
with migration_name=" 2"
at schema-engine/core/src/commands/apply_migrations.rs:91"#]];
expectation.assert_eq(&err);
"#]];
expectation.assert_eq(err.message().unwrap());
}

#[test_connector(tags(CockroachDb), exclude(CockroachDb231))]
Expand Down Expand Up @@ -74,7 +68,7 @@ fn failing_step_in_migration_dropping_data(api: TestApi) {
"#,
];
let dir = write_migrations(migrations);
let err = api.apply_migrations(&dir).send_unwrap_err().to_string();
let err = api.apply_migrations(&dir).send_unwrap_err();
let expectation = expect![[r#"
A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
Expand All @@ -86,14 +80,8 @@ fn failing_step_in_migration_dropping_data(api: TestApi) {
ERROR: column "is_good_dog" does not exist
DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E42703), message: "column \"is_good_dog\" does not exist", detail: None, hint: None, position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("column_resolver.go"), line: Some(196), routine: Some("NewUndefinedColumnError") }
0: sql_schema_connector::apply_migration::apply_script
with migration_name=" 1"
at schema-engine/connectors/sql-schema-connector/src/apply_migration.rs:106
1: schema_core::commands::apply_migrations::Applying migration
with migration_name=" 1"
at schema-engine/core/src/commands/apply_migrations.rs:91"#]];
expectation.assert_eq(&err);
"#]];
expectation.assert_eq(err.message().unwrap());
}

// Skipped on CRDB 23.1 because of https://github.com/prisma/prisma/issues/20851
Expand Down Expand Up @@ -181,7 +169,7 @@ fn syntax_errors_return_error_position(api: TestApi) {
);
"#];
let dir = write_migrations(migrations);
let err = api.apply_migrations(&dir).send_unwrap_err().to_string();
let err = api.apply_migrations(&dir).send_unwrap_err();
let expectation = expect![[r#"
A migration failed to apply. New migrations cannot be applied before the error is recovered from. Read more about how to resolve migration issues in a production database: https://pris.ly/d/migrate-resolve
Expand All @@ -200,14 +188,8 @@ fn syntax_errors_return_error_position(api: TestApi) {
HINT: try \h CREATE TABLE
DbError { severity: "ERROR", parsed_severity: Some(Error), code: SqlState(E42601), message: "at or near \"is_good_dog\": syntax error", detail: Some("source SQL:\nCREATE TABLE \"Dog\" (\n id SERIAL PRIMARY KEY,\n name TEXT NOT NULL\n is_good_dog BOOLEAN NOT NULL DEFAULT TRUE\n ^"), hint: Some("try \\h CREATE TABLE"), position: None, where_: None, schema: None, table: None, column: None, datatype: None, constraint: None, file: Some("lexer.go"), line: Some(271), routine: Some("Error") }
0: sql_schema_connector::apply_migration::apply_script
with migration_name=" 0"
at schema-engine/connectors/sql-schema-connector/src/apply_migration.rs:106
1: schema_core::commands::apply_migrations::Applying migration
with migration_name=" 0"
at schema-engine/core/src/commands/apply_migrations.rs:91"#]];
expectation.assert_eq(&err);
"#]];
expectation.assert_eq(err.message().unwrap());
}

fn write_migrations(migrations: &[&str]) -> tempfile::TempDir {
Expand Down

0 comments on commit 925d1bf

Please sign in to comment.