Skip to content

Commit 7f98884

Browse files
authored
chore(go): bump Go version (#132)
1 parent 02c8921 commit 7f98884

File tree

11 files changed

+47
-29
lines changed

11 files changed

+47
-29
lines changed

go/go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
module github.com/adbc-drivers/bigquery/go
1616

17-
go 1.26.0
17+
go 1.26.1
1818

1919
require (
2020
cloud.google.com/go/auth v0.18.2
@@ -28,7 +28,7 @@ require (
2828
github.com/stretchr/testify v1.11.1
2929
golang.org/x/oauth2 v0.36.0
3030
golang.org/x/sync v0.20.0
31-
google.golang.org/api v0.269.0
31+
google.golang.org/api v0.270.0
3232
google.golang.org/grpc v1.79.2
3333
)
3434

@@ -70,7 +70,7 @@ require (
7070
go.opentelemetry.io/otel/metric v1.42.0 // indirect
7171
go.opentelemetry.io/otel/sdk v1.42.0 // indirect
7272
go.opentelemetry.io/otel/trace v1.42.0 // indirect
73-
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
73+
go.opentelemetry.io/proto/otlp v1.10.0 // indirect
7474
golang.org/x/crypto v0.48.0 // indirect
7575
golang.org/x/exp v0.0.0-20260218203240-3dfff04db8fa // indirect
7676
golang.org/x/mod v0.33.0 // indirect

go/go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ go.opentelemetry.io/otel/sdk/metric v1.42.0 h1:D/1QR46Clz6ajyZ3G8SgNlTJKBdGp84q9
142142
go.opentelemetry.io/otel/sdk/metric v1.42.0/go.mod h1:Ua6AAlDKdZ7tdvaQKfSmnFTdHx37+J4ba8MwVCYM5hc=
143143
go.opentelemetry.io/otel/trace v1.42.0 h1:OUCgIPt+mzOnaUTpOQcBiM/PLQ/Op7oq6g4LenLmOYY=
144144
go.opentelemetry.io/otel/trace v1.42.0/go.mod h1:f3K9S+IFqnumBkKhRJMeaZeNk9epyhnCmQh/EysQCdc=
145-
go.opentelemetry.io/proto/otlp v1.9.0 h1:l706jCMITVouPOqEnii2fIAuO3IVGBRPV5ICjceRb/A=
146-
go.opentelemetry.io/proto/otlp v1.9.0/go.mod h1:xE+Cx5E/eEHw+ISFkwPLwCZefwVjY+pqKg1qcK03+/4=
145+
go.opentelemetry.io/proto/otlp v1.10.0 h1:IQRWgT5srOCYfiWnpqUYz9CVmbO8bFmKcwYxpuCSL2g=
146+
go.opentelemetry.io/proto/otlp v1.10.0/go.mod h1:/CV4QoCR/S9yaPj8utp3lvQPoqMtxXdzn7ozvvozVqk=
147147
go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
148148
go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
149149
golang.org/x/crypto v0.48.0 h1:/VRzVqiRSggnhY7gNRxPauEQ5Drw9haKdM0jqfcCFts=
@@ -172,8 +172,8 @@ golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da h1:noIWHXmPHxILtqtCOPIhS
172172
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90=
173173
gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4=
174174
gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E=
175-
google.golang.org/api v0.269.0 h1:qDrTOxKUQ/P0MveH6a7vZ+DNHxJQjtGm/uvdbdGXCQg=
176-
google.golang.org/api v0.269.0/go.mod h1:N8Wpcu23Tlccl0zSHEkcAZQKDLdquxK+l9r2LkwAauE=
175+
google.golang.org/api v0.270.0 h1:4rJZbIuWSTohczG9mG2ukSDdt9qKx4sSSHIydTN26L4=
176+
google.golang.org/api v0.270.0/go.mod h1:5+H3/8DlXpQWrSz4RjGGwz5HfJAQSEI8Bc6JqQNH77U=
177177
google.golang.org/genproto v0.0.0-20260226221140-a57be14db171 h1:RxhCsti413yL0IjU9dVvuTbCISo8gs3RW1jPMStck+4=
178178
google.golang.org/genproto v0.0.0-20260226221140-a57be14db171/go.mod h1:uhvzakVEqAuXU3TC2JCsxIRe5f77l+JySE3EqPoMyqM=
179179
google.golang.org/genproto/googleapis/api v0.0.0-20260226221140-a57be14db171 h1:tu/dtnW1o3wfaxCOjSLn5IRX4YDcJrtlpzYkhHhGaC4=

go/pixi.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

go/validation/tests/bigquery.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class BigQueryQuirks(model.DriverQuirks):
3535
connection_set_current_catalog=False,
3636
connection_set_current_schema=True,
3737
connection_transactions=True,
38+
get_objects=True,
3839
get_objects_constraints_foreign=True,
3940
get_objects_constraints_primary=True,
4041
statement_bind=True,
@@ -148,4 +149,9 @@ def sample_ddl_constraints(self) -> list[str]:
148149
]
149150

150151

151-
QUIRKS = [BigQueryQuirks()]
152+
@functools.cache
153+
def get_quirks(version: str) -> BigQueryQuirks:
154+
quirks = BigQueryQuirks()
155+
if version != quirks.short_version:
156+
raise ValueError(f"Unsupported BigQuery version: {version}")
157+
return quirks

go/validation/tests/bigquery/conftest.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
import os
1616

1717
import pytest
18+
from tests import bigquery
1819

1920

2021
def pytest_generate_tests(metafunc) -> None:
22+
quirks = bigquery.get_quirks(metafunc.config.getoption("vendor_version"))
2123
metafunc.parametrize(
2224
"driver",
23-
[pytest.param("bigquery:", id="bigquery")],
25+
[f"{quirks.name}:{quirks.short_version}"],
2426
scope="module",
2527
indirect=["driver"],
2628
)

go/validation/tests/conftest.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,28 @@
1616
from pathlib import Path
1717

1818
import adbc_drivers_validation.model
19+
import adbc_drivers_validation.tests.conftest
1920
import pytest
2021
from adbc_drivers_validation.tests.conftest import ( # noqa: F401
2122
conn,
2223
conn_factory,
2324
manual_test,
24-
pytest_addoption,
2525
pytest_collection_modifyitems,
2626
)
2727

28-
from .bigquery import BigQueryQuirks
28+
from . import bigquery
29+
30+
31+
def pytest_addoption(parser):
32+
adbc_drivers_validation.tests.conftest.pytest_addoption(parser)
33+
parser.addoption("--vendor-version", action="store", default="1.73.1")
2934

3035

3136
@pytest.fixture(scope="session")
32-
def driver(request) -> adbc_drivers_validation.model.DriverQuirks:
37+
def driver(request, pytestconfig) -> adbc_drivers_validation.model.DriverQuirks:
3338
driver = request.param
3439
assert driver.startswith("bigquery")
35-
return BigQueryQuirks()
40+
return bigquery.get_quirks(pytestconfig.getoption("vendor_version"))
3641

3742

3843
@pytest.fixture(scope="session")

go/validation/tests/generate_documentation.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@
2626
template = Path(__file__).parent.parent.parent / "docs/bigquery.md"
2727
template = template.resolve()
2828

29+
reports = [report.resolve() for report in Path(".").glob("validation-report*.xml")]
2930
generate_documentation.generate(
30-
bigquery.QUIRKS,
31-
Path("validation-report.xml").resolve(),
31+
bigquery.get_quirks,
32+
reports,
3233
template,
3334
args.output.resolve(),
3435
)

go/validation/tests/test_connection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919

2020

2121
def pytest_generate_tests(metafunc) -> None:
22-
return connection_tests.generate_tests(bigquery.QUIRKS, metafunc)
22+
quirks = [bigquery.get_quirks(metafunc.config.getoption("vendor_version"))]
23+
return connection_tests.generate_tests(quirks, metafunc)
2324

2425

2526
class TestConnection(connection_tests.TestConnection):

go/validation/tests/test_ingest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@
1818

1919

2020
def pytest_generate_tests(metafunc) -> None:
21+
quirks = [bigquery.get_quirks(metafunc.config.getoption("vendor_version"))]
2122
return adbc_drivers_validation.tests.ingest.generate_tests(
22-
bigquery.QUIRKS,
23+
quirks,
2324
metafunc,
2425
ingest_mode_queries={"ingest/string", "ingest/string:storagewrite"},
2526
)

go/validation/tests/test_query.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818

1919

2020
def pytest_generate_tests(metafunc) -> None:
21-
return query_tests.generate_tests(bigquery.QUIRKS, metafunc)
21+
quirks = [bigquery.get_quirks(metafunc.config.getoption("vendor_version"))]
22+
return query_tests.generate_tests(quirks, metafunc)
2223

2324

2425
class TestQuery(query_tests.TestQuery):

0 commit comments

Comments
 (0)