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

chore(deps): update prismagraphql/cockroachdb-custom:23.1 docker digest to b6cbbf9 #4504

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 27, 2023

Mend Renovate

This PR contains the following updates:

Package Update Change
prismagraphql/cockroachdb-custom digest c5a9735 -> b6cbbf9

Configuration

📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner November 27, 2023 23:00
@renovate renovate bot requested review from jkomyno and Weakky and removed request for a team November 27, 2023 23:00
Copy link

codspeed-hq bot commented Nov 27, 2023

CodSpeed Performance Report

Merging #4504 will not alter performance

Comparing renovate/prismagraphql-cockroachdb-custom-23.1 (54f84c7) with main (45a0eb4)

Summary

✅ 11 untouched benchmarks

@Jolg42 Jolg42 added tech/engines Issue for tech Engines. topic: tech debt labels Dec 7, 2023
@renovate renovate bot force-pushed the renovate/prismagraphql-cockroachdb-custom-23.1 branch from c5b88dd to 59a5941 Compare December 7, 2023 15:01
@renovate renovate bot force-pushed the renovate/prismagraphql-cockroachdb-custom-23.1 branch from 59a5941 to 0d5b1a1 Compare December 8, 2023 10:29
@Jolg42 Jolg42 self-assigned this Dec 15, 2023
@@ -0,0 +1,41 @@
-- tags=CockroachDb231
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to use

-- tags=cockroachdb
-- exclude=CockroachDb222,CockroachDb221

But that didn't work, if someone is interested to fix that, that could be done outside of this PR

Copy link
Contributor Author

renovate bot commented Dec 15, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

Copy link
Contributor

github-actions bot commented Dec 15, 2023

WASM Size

Engine This PR Base branch Diff
Postgres 2.042MiB 2.042MiB 321.000B
Postgres (gzip) 809.192KiB 809.342KiB -154.000B
Mysql 2.023MiB 2.022MiB 1.144KiB
Mysql (gzip) 800.781KiB 800.885KiB -107.000B
Sqlite 1.985MiB 1.984MiB 787.000B
Sqlite (gzip) 787.210KiB 787.544KiB -342.000B

…oreign_keys_duplicates_should_be_ignored_23_1_and_up.sql
@Jolg42 Jolg42 added this to the 5.8.0 milestone Dec 15, 2023
@Jolg42
Copy link
Member

Jolg42 commented Dec 15, 2023

I found that some tests are failing, see how it fails while testing sql-migration-tests
https://github.com/prisma/prisma-engines/actions/runs/7220495786/job/19674065675?pr=4504#step:8:3330

2023-12-15T10:12:28.610452Z DEBUG SchemaPush{migration_id=None}:diff: sql_schema_connector: Inferred migration steps. steps=[AlterSequence(MigrationPair { previous: 0, next: 0 }, SequenceChanges(BitFlags<SequenceChange>(0b10, MaxValue)))]
2023-12-15T10:12:28.610528Z DEBUG SchemaPush{migration_id=None}: schema_core::commands::schema_push: migration=""
2023-12-15T10:12:28.610637Z DEBUG SchemaPush{migration_id=None}:apply_migration: sql_schema_connector::apply_migration: 1 steps to execute
2023-12-15T10:12:28.610712Z DEBUG SchemaPush{migration_id=None}:apply_migration:migration_step{step=AlterSequence(MigrationPair { previous: 0, next: 0 }, SequenceChanges(BitFlags<SequenceChange>(0b10, MaxValue)))}: sql_schema_connector::flavour::postgres::connection: query_type="raw_cmd" sql="ALTER SEQUENCE \"Test_seqCol_seq\" MAXVALUE 9223372036854775807"
2023-12-15T10:12:28.698855Z DEBUG SchemaPush{migration_id=None}:apply_migration:migration_step{step=AlterSequence(MigrationPair { previous: 0, next: 0 }, SequenceChanges(BitFlags<SequenceChange>(0b10, MaxValue)))}:quaint:query{db.statement=ALTER SEQUENCE "Test_seqCol_seq" MAXVALUE 9223372036854775807}: quaint::connector::metrics: query=ALTER SEQUENCE "Test_seqCol_seq" MAXVALUE 9223372036854775807 params=[] result="success" item_type="query" is_query=true duration_ms=88

Test failure assert_has_executed_steps: expected 0 but got 1 steps.
thread 'migrations::cockroachdb::sequences_without_options_can_be_created_on_non_id_fields' panicked at schema-engine/sql-migration-tests/tests/migrations/cockroachdb.rs:984:47:
explicit panic


failures:
    migrations::cockroachdb::sequence_with_multiple_models_works
    migrations::cockroachdb::sequences_without_options_can_be_created
    migrations::cockroachdb::sequences_without_options_can_be_created_on_non_id_fields

After investigating sequence_with_multiple_models_works I found out that with the following schema

generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "cockroachdb"
  url      = env("DATABASE_URL")
}

model TestModel {
  id BigInt @id @default(autoincrement())
}

model TestModelSeq {
  name String
  id   Int    @id @default(sequence())
}
  • the first run of db push creates the database schema, which is expected
  • a second run of db push is normally expected to do nothing, but instead it executes the following SQL ALTER SEQUENCE \"TestModelSeq_id_seq\" MAXVALUE 9223372036854775807
  • a third run of db push does nothing, we're back in a good state here.

docker-compose.yml Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Jan 10, 2024

✅ WASM query-engine performance won't change substantially (0.996x)

Full benchmark report
DATABASE_URL="postgresql://postgres:postgres@localhost:5432/bench?schema=imdb_bench&sslmode=disable" \
node --experimental-wasm-modules query-engine/driver-adapters/executor/dist/bench.mjs
cpu: AMD EPYC 7763 64-Core Processor
runtime: node v18.19.0 (x64-linux)

benchmark                   time (avg)             (min … max)       p75       p99      p999
-------------------------------------------------------------- -----------------------------
• movies.findMany() (all - 25000)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  301.58 ms/iter (299.83 ms … 311.45 ms) 300.73 ms 311.45 ms 311.45 ms
Web Assembly: Latest       387 ms/iter (385.63 ms … 387.92 ms) 387.45 ms 387.92 ms 387.92 ms
Web Assembly: Current   385.23 ms/iter (383.46 ms … 389.65 ms)  386.6 ms 389.65 ms 389.65 ms
Node API: Current       226.92 ms/iter  (220.27 ms … 238.3 ms) 231.26 ms  238.3 ms  238.3 ms

summary for movies.findMany() (all - 25000)
  Web Assembly: Current
   1.7x slower than Node API: Current
   1.28x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

• movies.findMany({ take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.16 ms/iter   (12.05 ms … 12.56 ms)  12.19 ms  12.56 ms  12.56 ms
Web Assembly: Latest     15.73 ms/iter   (15.61 ms … 16.18 ms)  15.76 ms  16.18 ms  16.18 ms
Web Assembly: Current    15.76 ms/iter   (15.55 ms … 17.53 ms)  15.77 ms  17.53 ms  17.53 ms
Node API: Current        8,816 µs/iter   (8,630 µs … 9,117 µs)  8,889 µs  9,117 µs  9,117 µs

summary for movies.findMany({ take: 2000 })
  Web Assembly: Current
   1.79x slower than Node API: Current
   1.3x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

• movies.findMany({ where: {...}, take: 2000 })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1,945 µs/iter   (1,848 µs … 3,237 µs)  1,926 µs  2,965 µs  3,237 µs
Web Assembly: Latest     2,516 µs/iter   (2,386 µs … 3,867 µs)  2,503 µs  3,323 µs  3,867 µs
Web Assembly: Current    2,501 µs/iter   (2,395 µs … 3,588 µs)  2,488 µs  3,161 µs  3,588 µs
Node API: Current        1,517 µs/iter   (1,446 µs … 1,732 µs)  1,534 µs  1,700 µs  1,732 µs

summary for movies.findMany({ where: {...}, take: 2000 })
  Web Assembly: Current
   1.65x slower than Node API: Current
   1.29x slower than Web Assembly: Baseline
   1.01x faster than Web Assembly: Latest

• movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.13 ms/iter   (12.03 ms … 12.46 ms)  12.17 ms  12.46 ms  12.46 ms
Web Assembly: Latest     15.73 ms/iter    (15.58 ms … 15.9 ms)  15.76 ms   15.9 ms   15.9 ms
Web Assembly: Current    15.67 ms/iter   (15.57 ms … 15.84 ms)   15.7 ms  15.84 ms  15.84 ms
Node API: Current        8,790 µs/iter   (8,589 µs … 9,185 µs)  8,839 µs  9,185 µs  9,185 µs

summary for movies.findMany({ include: { cast: true } take: 2000 }) (m2m)
  Web Assembly: Current
   1.78x slower than Node API: Current
   1.29x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

• movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1,893 µs/iter   (1,823 µs … 2,723 µs)  1,895 µs  2,448 µs  2,723 µs
Web Assembly: Latest     2,485 µs/iter   (2,397 µs … 3,298 µs)  2,485 µs  2,999 µs  3,298 µs
Web Assembly: Current    2,481 µs/iter   (2,397 µs … 3,336 µs)  2,479 µs  2,984 µs  3,336 µs
Node API: Current        1,503 µs/iter   (1,432 µs … 1,952 µs)  1,517 µs  1,767 µs  1,952 µs

summary for movies.findMany({ where: {...}, include: { cast: true } take: 2000 }) (m2m)
  Web Assembly: Current
   1.65x slower than Node API: Current
   1.31x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

• movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   12.13 ms/iter   (12.02 ms … 12.45 ms)  12.15 ms  12.45 ms  12.45 ms
Web Assembly: Latest     15.69 ms/iter   (15.58 ms … 15.93 ms)  15.71 ms  15.93 ms  15.93 ms
Web Assembly: Current    15.61 ms/iter    (15.5 ms … 15.75 ms)  15.63 ms  15.75 ms  15.75 ms
Node API: Current        8,824 µs/iter   (8,664 µs … 9,140 µs)  8,890 µs  9,140 µs  9,140 µs

summary for movies.findMany({ take: 2000, include: { cast: { include: { person: true } } } })
  Web Assembly: Current
   1.77x slower than Node API: Current
   1.29x slower than Web Assembly: Baseline
   1.01x faster than Web Assembly: Latest

• movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline   1,880 µs/iter   (1,804 µs … 3,015 µs)  1,877 µs  2,513 µs  3,015 µs
Web Assembly: Latest     2,481 µs/iter   (2,371 µs … 3,917 µs)  2,455 µs  3,611 µs  3,917 µs
Web Assembly: Current    2,429 µs/iter   (2,369 µs … 2,744 µs)  2,435 µs  2,673 µs  2,744 µs
Node API: Current        1,518 µs/iter   (1,441 µs … 1,712 µs)  1,536 µs  1,688 µs  1,712 µs

summary for movie.findMany({ where: { ... }, take: 2000, include: { cast: { include: { person: true } } } })
  Web Assembly: Current
   1.6x slower than Node API: Current
   1.29x slower than Web Assembly: Baseline
   1.02x faster than Web Assembly: Latest

• movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  911.14 µs/iter  (850.17 µs … 1,568 µs) 904.69 µs  1,444 µs  1,568 µs
Web Assembly: Latest     1,200 µs/iter   (1,144 µs … 1,853 µs)  1,203 µs  1,500 µs  1,853 µs
Web Assembly: Current    1,215 µs/iter   (1,156 µs … 1,871 µs)  1,214 µs  1,806 µs  1,871 µs
Node API: Current       816.97 µs/iter  (732.03 µs … 1,223 µs) 830.57 µs  1,119 µs  1,223 µs

summary for movie.findMany({ where: { reviews: { author: { ... } }, take: 100 }) (to-many -> to-one)
  Web Assembly: Current
   1.49x slower than Node API: Current
   1.33x slower than Web Assembly: Baseline
   1.01x slower than Web Assembly: Latest

• movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
-------------------------------------------------------------- -----------------------------
Web Assembly: Baseline  890.79 µs/iter  (849.12 µs … 2,544 µs) 894.82 µs  1,163 µs  2,544 µs
Web Assembly: Latest     1,212 µs/iter   (1,154 µs … 1,864 µs)  1,214 µs  1,808 µs  1,864 µs
Web Assembly: Current    1,209 µs/iter   (1,160 µs … 1,490 µs)  1,218 µs  1,463 µs  1,490 µs
Node API: Current       825.63 µs/iter   (785.6 µs … 1,064 µs) 833.84 µs 910.18 µs  1,064 µs

summary for movie.findMany({ where: { cast: { person: { ... } }, take: 100 }) (m2m -> to-one)
  Web Assembly: Current
   1.46x slower than Node API: Current
   1.36x slower than Web Assembly: Baseline
   1x faster than Web Assembly: Latest

After changes in 54f84c7

@jkomyno
Copy link
Contributor

jkomyno commented Jan 22, 2024

This PR is currently paused to give more breath to driver-adapters correctness fixes, which we want to be done with this sprint.

@Jolg42 Jolg42 removed this from the 5.9.0 milestone Feb 12, 2024
@Jolg42
Copy link
Member

Jolg42 commented Feb 12, 2024

Note: this blocks running tests on the new CockroachDB version 23.2.
See PR #4719

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech/engines Issue for tech Engines. topic: tech debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants