-
-
Notifications
You must be signed in to change notification settings - Fork 150
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
Running bq mk -d {dataset} against the emulator fails with this errors:
$ bq version
This is BigQuery CLI 2.1.10
$ bq --api=http://localhost:19050/ --project_id=camus-unittest mk -d test_${RANDOM}${RANDOM}
You have encountered a bug in the BigQuery CLI. Please file a bug report in our public issue tracker:
https://issuetracker.google.com/issues/new?component=187149&template=0
Please include a brief description of the steps that led to this issue, as well as any rows that can be made public from the following information:
========================================
== Platform ==
CPython:3.10.9:Linux-6.10.14-linuxkit-aarch64-with-glibc2.35
== bq version ==
2.1.10
== Command line ==
['/usr/lib/google-cloud-sdk/platform/bq/bq.py', '--project_id=camus-infra', '--api=http://host.docker.internal:19050/', '--project_id=camus-unittest', 'mk', '-d', 'test_177583752']
== UTC timestamp ==
2025-09-12 17:19:08
== Error trace ==
Traceback (most recent call last):
File "/usr/lib/google-cloud-sdk/platform/bq/frontend/bigquery_command.py", line 278, in RunSafely
return_value = self.RunWithArgs(*args, **kwds)
File "/usr/lib/google-cloud-sdk/platform/bq/frontend/command_make.py", line 1272, in RunWithArgs
client_dataset.CreateDataset(
File "/usr/lib/google-cloud-sdk/platform/bq/clients/client_dataset.py", line 312, in CreateDataset
apiclient.datasets().insert(body=body, **args).execute()
File "/usr/lib/google-cloud-sdk/platform/bq/third_party/googleapiclient/discovery.py", line 1081, in method
raise TypeError('Got an unexpected keyword argument "%s"' % name)
TypeError: Got an unexpected keyword argument "accessPolicyVersion"
========================================
Unexpected exception in mk operation: You have encountered a bug in the BigQuery CLI. Please file a bug report in our public issue tracker:
https://issuetracker.google.com/issues/new?component=187149&template=0
Please include a brief description of the steps that led to this issue, as well as any rows that can be made public from the following information:What did you expect to happen?
I expected the dataset to be created.
How can we reproduce it (as minimally and precisely as possible)?
Install google-cloud-cli version 503.0.0-0 or more recent (bq version 2.1.10 or more recent) and attempt to create a dataset, e.g.
bq --api=http://localhost:19050/ --project_id=camus-unittest mk -d test_${RANDOM}${RANDOM}Anything else we need to know?
This issue was introduced in google-cloud-cli 503.0.0-0. A workaround is to run with an older version of the package.
The root cause appears to be that GCP updated their discovery JSON document to include a new accessPolicyVersion parameter which is not present in the emulator's discovery document. The bq tool expects to be able to set this field, at which point it fails.
Updating the discovery JSON document seems like it would fix this.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working