Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
75499: sql: add constraint IDs and use them for comments r=fqazi a=fqazi

This pull request will make the following changes:

1) Modify table descriptor logic to start allocating constraint IDs for each table constraint.
2) Add a migration to upgrade existing descriptors to have constraint IDs
3) Modify the comment updater / comment logic to references constraints by ConstraintID and update the obj_description builtin to look these up.

75888: kvstreamer: fix a bug with incorrect processing of empty scan responses r=yuzefovich a=yuzefovich

**kvstreamer: fix a bug with incorrect processing of empty scan responses**

Previously, the `Streamer` could get stuck indefinitely when a response
for a Scan request came back empty - namely the response neither had no
bytes inside nor ResumeSpan set (this is the case when there is no data
in the key span to scan). This would lead to `GetResults` call being
stuck thinking there are more responses to come back, and none would
show up.

This is now fixed by creating a Result with an empty Scan response
inside of it. This approach makes it easier to support Scans that span
multiple ranges and the last range has no data in it - we want to be
able to set Complete field on such an empty Result.

Since this was the only known bug with the `Streamer` implementation,
the streamer is now used by default again.

Fixes: #75708.

Release note: None

**kvstreamer: minor cleanup**

This commit replaces the last buffered channel we had in the `Streamer`
code in favor of a condition variable which simplifies the control flow
a bit.

Additionally, this commit refactors the code so that empty Get responses
are not returned which allows us to clean up `TxnKVStreamer` a bit. Care
has to be taken so that we still signal the client's goroutine waiting
for results when an empty Get response comes back (similar to the bug
fixed by the previous commit).

Also, the tracking of the "number of outstanding requests" in
`TxnKVStreamer` has been removed since it provided little value (and
probably was broken anyway).

Release note: None

76189: dev: test using datadriven r=irfansharif a=irfansharif

This commit groups a few changes to speed up dev and make it easier to
test.

1. Update `dev bench` to run benchmarks using `bazel test` directly
   instead of first grepping for benchmarks, querying test targets, and
   only then invoking test binaries using `bazel run`. The latter
   approach was both slower and more difficult to test. `dev bench` now
   looks identical to the `dev test` implementation.

2. Simplify `dev test`; now that protobuf targets are directly
   buildable, we don't need any manual querying of build targets and
   filtering for only go_test ones -- we can more easy `bazel test`
   whatever was top-level package was specified. This reduces how much
   I/O needs to happen with the host environment which both speeds
   things up and makes it easier to test.
   a. It also allows us to partially revert [#74808](#74808) while still retaining
      informative error messages about missing targets (bazel's ones
      out-of-the-box are pretty good).

3. Finally, introduce TestDataDriven and TestRecorderDriven.
   a. TestDataDriven makes use of datadriven to capture all operations
      executed by individual dev invocations. The testcases are defined
      under testdata/datadriven/*. DataDriven divvies up these files as
      subtests, so individual "files" are runnable through:

          dev test pkg/cmd/dev -f TestDataDrivenDriven/<fname> [--rewrite]
          OR  go test ./pkg/cmd/dev -run TestDataDrivenDriven/<fname> [-rewrite]

   b. TestRecorderDriven makes use of datadriven/recorder to record (if
      --rewrite is specified) or play back (if --rewrite is omitted) all
      operations executed by individual dev invocations. The testcases
      are defined under testdata/recorderdriven/\*; each test file
      corresponds to a captured recording found in
      testdata/recorderdriven/\*.rec.

          dev test pkg/cmd/dev -f TestRecorderDriven/<fname>
          OR  go test ./pkg/cmd/dev -run TestRecorderDriven/<fname> [-rewrite]

      Recordings are used to mock out "system" behavior. When --rewrite
      is specified, attempts to shell out to bazel or perform other OS
      operations (like creating, removing, symlinking filepaths) are
      intercepted and system responses are recorded for future playback.

It's worth comparing TestDataDriven and TestRecorderDriven.
a. TestDataDriven is well suited for exercising flows that don't depend
   on reading external state in order to function (simply translating a
   `dev test <target>` to its corresponding bazel invocation for e.g.)
   All operations are run in "dry-run" mode when --rewrite is specified;
   all exec/os commands return successfully with no error + an empty
   response, and just the commands are recorded as test data.
b. TestRecorderDriven in contrast works better for flows that do depend
   on external state during execution (like reading the set of targets
   from a file for e.g., or hoisting files from a sandbox by searching
   through the file system directly). With these, when --rewrite is
   specified, we actually do shell out  and record the data for future
   playback.

We previously (#68514) ripped out the equivalent of TestRecorderDriven
because it was difficult to use (large recordings, execution errors
failing the test, etc.) -- issues this PR tries to address. There are
some real limitations here though that may still make this approach
untenable: When --rewrite is used for TestRecorderDriven, because it
shells out, will:
- takes time proportional to the actual dev invocations;
- makes it difficult to run under bazel (through without --rewrite it
  works just fine);

The few remaining tests for this recorder stuff are probably examples of
dev doing too much, when it should instead push the logic down into
bazel rules. As we continue doing so, we should re-evaluate whether this
harness provides much value.

Release note: None

Co-authored-by: Faizan Qazi <[email protected]>
Co-authored-by: Yahor Yuzefovich <[email protected]>
Co-authored-by: irfan sharif <[email protected]>
  • Loading branch information
4 people committed Feb 9, 2022
4 parents 7c4e234 + 8acb646 + 4cc956f + 43f4b29 commit 456ff4c
Show file tree
Hide file tree
Showing 130 changed files with 2,371 additions and 2,508 deletions.
60 changes: 60 additions & 0 deletions DEPS.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2103,6 +2103,16 @@ def go_deps():
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/dustin/go-humanize/com_github_dustin_go_humanize-v1.0.0.zip",
],
)
go_repository(
name = "com_github_dvyukov_go_fuzz",
build_file_proto_mode = "disable_global",
importpath = "github.com/dvyukov/go-fuzz",
sha256 = "0a4c4bc0a550c729115d74f6a636e5802894b33bc50aa8af99c4a70196d5990b",
strip_prefix = "github.com/dvyukov/[email protected]",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/dvyukov/go-fuzz/com_github_dvyukov_go_fuzz-v0.0.0-20210103155950-6a8e9d1f2415.zip",
],
)
go_repository(
name = "com_github_eapache_go_resiliency",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -2173,6 +2183,16 @@ def go_deps():
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/elastic/gosigar/com_github_elastic_gosigar-v0.14.1.zip",
],
)
go_repository(
name = "com_github_elazarl_go_bindata_assetfs",
build_file_proto_mode = "disable_global",
importpath = "github.com/elazarl/go-bindata-assetfs",
sha256 = "ee91e4dedf0efd24ddf201e8f8b62f0b79a64efd0d205b30bcd9fa95f905cd15",
strip_prefix = "github.com/elazarl/[email protected]",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/elazarl/go-bindata-assetfs/com_github_elazarl_go_bindata_assetfs-v1.0.1.zip",
],
)
go_repository(
name = "com_github_elazarl_goproxy",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -4107,6 +4127,16 @@ def go_deps():
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/influxdata/usage-client/com_github_influxdata_usage_client-v0.0.0-20160829180054-6d3895376368.zip",
],
)
go_repository(
name = "com_github_irfansharif_recorder",
build_file_proto_mode = "disable_global",
importpath = "github.com/irfansharif/recorder",
sha256 = "4a2f085d5339eba18558059c51110de1ff6d9ab8389ece8818fd2f62b7b2e7ab",
strip_prefix = "github.com/irfansharif/[email protected]",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/irfansharif/recorder/com_github_irfansharif_recorder-v0.0.0-20211218081646-a21b46510fd6.zip",
],
)
go_repository(
name = "com_github_iris_contrib_blackfriday",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -4567,6 +4597,16 @@ def go_deps():
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/julienschmidt/httprouter/com_github_julienschmidt_httprouter-v1.3.0.zip",
],
)
go_repository(
name = "com_github_julusian_godocdown",
build_file_proto_mode = "disable_global",
importpath = "github.com/Julusian/godocdown",
sha256 = "1bd26f1d29b20d40b3eb0a5678691a2e6e153c473efe079b8b1bbd97a7cc1f57",
strip_prefix = "github.com/Julusian/[email protected]",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/Julusian/godocdown/com_github_julusian_godocdown-v0.0.0-20170816220326-6d19f8ff2df8.zip",
],
)
go_repository(
name = "com_github_jung_kurt_gofpdf",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -6603,6 +6643,16 @@ def go_deps():
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/retailnext/hllpp/com_github_retailnext_hllpp-v1.0.1-0.20180308014038-101a6d2f8b52.zip",
],
)
go_repository(
name = "com_github_robertkrimen_godocdown",
build_file_proto_mode = "disable_global",
importpath = "github.com/robertkrimen/godocdown",
sha256 = "789ed4a63a797e0dbac7c358eafa8fec4c9885f67ee61da941af4bad2d8c3b55",
strip_prefix = "github.com/robertkrimen/[email protected]",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/robertkrimen/godocdown/com_github_robertkrimen_godocdown-v0.0.0-20130622164427-0bfa04905481.zip",
],
)
go_repository(
name = "com_github_robfig_cron_v3",
build_file_proto_mode = "disable_global",
Expand Down Expand Up @@ -7093,6 +7143,16 @@ def go_deps():
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/stefanberger/go-pkcs11uri/com_github_stefanberger_go_pkcs11uri-v0.0.0-20201008174630-78d3cae3a980.zip",
],
)
go_repository(
name = "com_github_stephens2424_writerset",
build_file_proto_mode = "disable_global",
importpath = "github.com/stephens2424/writerset",
sha256 = "a5444ddf04cda5666c4511e5ca793a80372d560376c4193a1fa2e2294d0760dc",
strip_prefix = "github.com/stephens2424/[email protected]",
urls = [
"https://storage.googleapis.com/cockroach-godeps/gomod/github.com/stephens2424/writerset/com_github_stephens2424_writerset-v1.0.2.zip",
],
)
go_repository(
name = "com_github_stoewer_go_strcase",
build_file_proto_mode = "disable_global",
Expand Down
2 changes: 1 addition & 1 deletion dev
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -euo pipefail

# Bump this counter to force rebuilding `dev` on all machines.
DEV_VERSION=12
DEV_VERSION=13

THIS_DIR=$(cd "$(dirname "$0")" && pwd)
BINARY_DIR=$THIS_DIR/bin/dev-versions
Expand Down
1 change: 1 addition & 0 deletions docs/generated/redact_safe.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pkg/sql/catalog/descpb/structured.go | `DescriptorVersion`
pkg/sql/catalog/descpb/structured.go | `IndexDescriptorVersion`
pkg/sql/catalog/descpb/structured.go | `MutationID`
pkg/sql/sem/catid/ids.go | `ColumnID`
pkg/sql/sem/catid/ids.go | `ConstraintID`
pkg/sql/sem/catid/ids.go | `DescID`
pkg/sql/sem/catid/ids.go | `FamilyID`
pkg/sql/sem/catid/ids.go | `IndexID`
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ require (
github.com/gorilla/mux v1.8.0
github.com/goware/modvendor v0.5.0
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/irfansharif/recorder v0.0.0-20211218081646-a21b46510fd6
github.com/jackc/pgconn v1.10.0
github.com/jackc/pgproto3/v2 v2.1.1
github.com/jackc/pgtype v1.8.1
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtix
github.com/HdrHistogram/hdrhistogram-go v1.1.0/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo=
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
github.com/Joker/jade v1.0.1-0.20190614124447-d475f43051e7/go.mod h1:6E6s8o2AE4KhCrqr6GRJjdC/gNfTdxkIXvuGZZda2VM=
github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/Masterminds/glide v0.13.2/go.mod h1:STyF5vcenH/rUqTEv+/hBXlSTo7KYwg2oc2f4tzPWic=
github.com/Masterminds/goutils v1.1.0 h1:zukEsf/1JZwCMgHiK3GZftabmxiCw4apj3a28RPBiVg=
Expand Down Expand Up @@ -637,6 +638,7 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3
github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/dvyukov/go-fuzz v0.0.0-20210103155950-6a8e9d1f2415/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw=
github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
github.com/eapache/go-resiliency v1.2.0 h1:v7g92e/KSN71Rq7vSThKaWIq68fL4YHvWyiUKorFR1Q=
github.com/eapache/go-resiliency v1.2.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
Expand All @@ -650,6 +652,7 @@ github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaB
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
github.com/elastic/gosigar v0.14.1 h1:T0aQ7n/n2ZA9W7DmAnj60v+qzqKERdBgJBO1CG2W6rc=
github.com/elastic/gosigar v0.14.1/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4=
github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc=
github.com/emicklei/dot v0.15.0 h1:XDBW0Xco1QNyRb33cqLe10cT04yMWL1XpCZfa98Q6Og=
Expand Down Expand Up @@ -1229,6 +1232,8 @@ github.com/influxdata/roaring v0.4.13-0.20180809181101-fc520f41fab6/go.mod h1:bS
github.com/influxdata/tdigest v0.0.0-20181121200506-bf2b5ad3c0a9/go.mod h1:Js0mqiSBE6Ffsg94weZZ2c+v/ciT8QRHFOap7EKDrR0=
github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y=
github.com/influxdata/usage-client v0.0.0-20160829180054-6d3895376368/go.mod h1:Wbbw6tYNvwa5dlB6304Sd+82Z3f7PmVZHVKU637d4po=
github.com/irfansharif/recorder v0.0.0-20211218081646-a21b46510fd6 h1:fwL5Wt/OpP14udrdhV+INmmRES4GWoPWqHamttadwKU=
github.com/irfansharif/recorder v0.0.0-20211218081646-a21b46510fd6/go.mod h1:0vDkLIc8rDX+zYp5wX/DG5MAWaHBAqmtXH/SE54vhpY=
github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI=
github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
github.com/iris-contrib/i18n v0.0.0-20171121225848-987a633949d0/go.mod h1:pMCz62A0xJL6I+umB2YTlFRwWXaDFA0jy+5HzGiJjqI=
Expand Down Expand Up @@ -1841,6 +1846,7 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M=
github.com/retailnext/hllpp v1.0.1-0.20180308014038-101a6d2f8b52/go.mod h1:RDpi1RftBQPUCDRw6SmxeaREsAaRKnOclghuzp/WRzc=
github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
Expand Down Expand Up @@ -1952,6 +1958,7 @@ github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5q
github.com/spf13/viper v1.8.1 h1:Kq1fyeebqsBfbjZj4EL7gj2IO0mMaiyjYUWcUsl2O44=
github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8=
github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc=
github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
Expand Down Expand Up @@ -2507,6 +2514,7 @@ golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/doctor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func TestDoctorZipDir(t *testing.T) {
defer c.Cleanup()

t.Run("examine", func(t *testing.T) {
out, err := c.RunWithCapture("debug doctor examine zipdir testdata/doctor/debugzip 21.1")
out, err := c.RunWithCapture("debug doctor examine zipdir testdata/doctor/debugzip 21.1-52")
if err != nil {
t.Fatal(err)
}
Expand All @@ -81,7 +81,7 @@ func TestDoctorZipDir(t *testing.T) {
})

t.Run("deprecated doctor zipdir with verbose", func(t *testing.T) {
out, err := c.RunWithCapture("debug doctor zipdir testdata/doctor/debugzip --verbose")
out, err := c.RunWithCapture("debug doctor zipdir testdata/doctor/debugzip 21.11-52 --verbose")
if err != nil {
t.Fatal(err)
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/testdata/doctor/test_examine_zipdir
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
debug doctor examine zipdir testdata/doctor/debugzip
----
debug doctor examine zipdir testdata/doctor/debugzip 21.1
debug doctor examine zipdir testdata/doctor/debugzip 21.1-52
WARNING: errors occurred during the production of system.jobs.txt, contents may be missing or incomplete.
Examining 37 descriptors and 42 namespace entries...
ParentID 52, ParentSchemaID 29: relation "users" (53): referenced database ID 52: referenced descriptor not found
Expand Down
11 changes: 6 additions & 5 deletions pkg/cli/testdata/doctor/test_examine_zipdir_verbose
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
debug doctor zipdir --verbose
----
debug doctor zipdir testdata/doctor/debugzip --verbose
debug doctor zipdir testdata/doctor/debugzip 21.11-52 --verbose
reading testdata/doctor/debugzip/system.descriptor.txt
reading testdata/doctor/debugzip/system.namespace.txt
WARNING: errors occurred during the production of system.jobs.txt, contents may be missing or incomplete.
Expand Down Expand Up @@ -39,15 +39,16 @@ Examining 37 descriptors and 42 namespace entries...
ParentID 0, ParentSchemaID 0: database "postgres" (51): processed
ParentID 52, ParentSchemaID 29: relation "users" (53): referenced database ID 52: referenced descriptor not found
ParentID 52, ParentSchemaID 29: relation "users" (53): processed
ParentID 52, ParentSchemaID 29: relation "vehicles" (54): referenced database ID 52: referenced descriptor not found
ParentID 52, ParentSchemaID 29: relation "vehicles" (54): constraint id was missing for constraint: FOREIGN KEY with name "fk_city_ref_users"
ParentID 52, ParentSchemaID 29: relation "vehicles" (54): processed
ParentID 52, ParentSchemaID 29: relation "rides" (55): referenced database ID 52: referenced descriptor not found
ParentID 52, ParentSchemaID 29: relation "rides" (55): constraint id was missing for constraint: FOREIGN KEY with name "fk_city_ref_users"
ParentID 52, ParentSchemaID 29: relation "rides" (55): constraint id was missing for constraint: FOREIGN KEY with name "fk_vehicle_city_ref_vehicles"
ParentID 52, ParentSchemaID 29: relation "rides" (55): processed
ParentID 52, ParentSchemaID 29: relation "vehicle_location_histories" (56): referenced database ID 52: referenced descriptor not found
ParentID 52, ParentSchemaID 29: relation "vehicle_location_histories" (56): constraint id was missing for constraint: FOREIGN KEY with name "fk_city_ref_rides"
ParentID 52, ParentSchemaID 29: relation "vehicle_location_histories" (56): processed
ParentID 52, ParentSchemaID 29: relation "promo_codes" (57): referenced database ID 52: referenced descriptor not found
ParentID 52, ParentSchemaID 29: relation "promo_codes" (57): processed
ParentID 52, ParentSchemaID 29: relation "user_promo_codes" (58): referenced database ID 52: referenced descriptor not found
ParentID 52, ParentSchemaID 29: relation "user_promo_codes" (58): constraint id was missing for constraint: FOREIGN KEY with name "fk_city_ref_users"
ParentID 52, ParentSchemaID 29: relation "user_promo_codes" (58): processed
ParentID 0, ParentSchemaID 0: namespace entry "defaultdb" (50): processed
ParentID 0, ParentSchemaID 0: namespace entry "movr" (52): descriptor not found
Expand Down
Loading

0 comments on commit 456ff4c

Please sign in to comment.