Skip to content

Pin Spanner pgadapter-emulator to v0.48.3 #660

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

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

dossy
Copy link
Collaborator

@dossy dossy commented Jul 17, 2025

A change to the Google Cloud Spanner PGAdapter and Spanner Emulator in v0.48.4 is breaking our dbmate test.

Our tests did not pin to a particular version, resulting in our tests starting to fail with no change to dbmate.

# grep -A1 spanner-emulator: docker-compose.yml 
  spanner-emulator:
    image: gcr.io/cloud-spanner-pg-adapter/pgadapter-emulator:v0.48.4

# go test -v -p 1 -tags netgo,osusergo,sqlite_omit_load_extension,sqlite_fts5,sqlite_json -ldflags '-s -extldflags "-static"' -run TestSpannerPostgresCreateMigrationsTable ./pkg/driver/postgres # ./...
=== RUN   TestSpannerPostgresCreateMigrationsTable
=== RUN   TestSpannerPostgresCreateMigrationsTable/default_schema
    postgres_test.go:83:
                Error Trace:    /src/pkg/driver/postgres/postgres_test.go:83
                                                        /src/pkg/driver/postgres/postgres_test.go:451
                Error:          Received unexpected error:
                                pq: NOT_FOUND: io.grpc.StatusRuntimeException: NOT_FOUND: Input file third_party/spanner_pg/catalog/proto/functions.txtpb not opened successfully. - Statement: 'select option_value from information_schema.database_options where option_name='database_dialect''
                Test:           TestSpannerPostgresCreateMigrationsTable/default_schema
--- FAIL: TestSpannerPostgresCreateMigrationsTable (0.04s)
    --- FAIL: TestSpannerPostgresCreateMigrationsTable/default_schema (0.04s)
FAIL
FAIL    github.com/amacneil/dbmate/v2/pkg/driver/postgres       0.046s
FAIL
make: *** [Makefile:43: test] Error 1

Our tests were passing up until version v0.48.3.

# grep -A1 spanner-emulator: docker-compose.yml 
  spanner-emulator:
    image: gcr.io/cloud-spanner-pg-adapter/pgadapter-emulator:v0.48.3

# go test -v -p 1 -tags netgo,osusergo,sqlite_omit_load_extension,sqlite_fts5,sqlite_json -ldflags '-s -extldflags "-static"' -run TestSpannerPostgresCreateMigrationsTable ./pkg/driver/postgres # ./...
=== RUN   TestSpannerPostgresCreateMigrationsTable
=== RUN   TestSpannerPostgresCreateMigrationsTable/default_schema
--- PASS: TestSpannerPostgresCreateMigrationsTable (2.12s)
    --- PASS: TestSpannerPostgresCreateMigrationsTable/default_schema (2.12s)
PASS
ok      github.com/amacneil/dbmate/v2/pkg/driver/postgres       2.123s

As this appears to be a failure introduced in the upstream emulator, let's pin our tests to version v0.48.3 for now.

A change to the [Google Cloud Spanner PGAdapter and Spanner Emulator][1] in v0.48.4 is breaking our `dbmate` test.

[1]: https://github.com/GoogleCloudPlatform/pgadapter?tab=readme-ov-file#emulator

Our tests did not pin to a particular version, resulting in our tests starting to fail with no change to dbmate.

```shell
go test -v -p 1 -tags netgo,osusergo,sqlite_omit_load_extension,sqlite_fts5,sqlite_json -ldflags '-s -extldflags "-static"' -run TestSpannerPostgresCreateMigrationsTable ./pkg/driver/postgres # ./...
=== RUN   TestSpannerPostgresCreateMigrationsTable
=== RUN   TestSpannerPostgresCreateMigrationsTable/default_schema
    postgres_test.go:83:
                Error Trace:    /src/pkg/driver/postgres/postgres_test.go:83
                                                        /src/pkg/driver/postgres/postgres_test.go:451
                Error:          Received unexpected error:
                                pq: NOT_FOUND: io.grpc.StatusRuntimeException: NOT_FOUND: Input file third_party/spanner_pg/catalog/proto/functions.txtpb not opened successfully. - Statement: 'select option_value from information_schema.database_options where option_name='database_dialect''
                Test:           TestSpannerPostgresCreateMigrationsTable/default_schema
--- FAIL: TestSpannerPostgresCreateMigrationsTable (0.04s)
    --- FAIL: TestSpannerPostgresCreateMigrationsTable/default_schema (0.04s)
FAIL
FAIL    github.com/amacneil/dbmate/v2/pkg/driver/postgres       0.046s
FAIL
make: *** [Makefile:43: test] Error 1
```

Our tests were passing up until version v0.48.3.

```shell
go test -v -p 1 -tags netgo,osusergo,sqlite_omit_load_extension,sqlite_fts5,sqlite_json -ldflags '-s -extldflags "-static"' -run TestSpannerPostgresCreateMigrationsTable ./pkg/driver/postgres # ./...
=== RUN   TestSpannerPostgresCreateMigrationsTable
=== RUN   TestSpannerPostgresCreateMigrationsTable/default_schema
--- PASS: TestSpannerPostgresCreateMigrationsTable (2.12s)
    --- PASS: TestSpannerPostgresCreateMigrationsTable/default_schema (2.12s)
PASS
ok      github.com/amacneil/dbmate/v2/pkg/driver/postgres       2.123s
```

As this appears to be a failure introduced in the upstream emulator, let's pin our tests to version v0.48.3 for now.
@dossy
Copy link
Collaborator Author

dossy commented Jul 17, 2025

Spanner Postgres interface support #555

@dossy dossy requested a review from amacneil July 17, 2025 15:53
@dossy dossy self-assigned this Jul 17, 2025
@dossy dossy added the dependencies Pull requests that update a dependency file label Jul 17, 2025
@dossy dossy enabled auto-merge (squash) July 17, 2025 15:55
@dossy dossy merged commit 91dae78 into amacneil:main Jul 23, 2025
10 checks passed
@dossy dossy deleted the chore/pin-to-pgadapter-emulator-v0.48.3 branch July 23, 2025 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants