-
Notifications
You must be signed in to change notification settings - Fork 322
Closed
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
Without a job ID, there's not much I can do to follow-up with an investigation into test flakes. Project ID, location, and job ID are the first things backend engineers request if there is a problem with a query job. We should ensure that our exceptions include this information (I believe we do much of the time) and just as importantly the repr
of the job, so that assertion errors like this include the right information.
Context
#947 had a system test flake.
# Insert a few rows and check the stats.
sql = f"""
BEGIN TRANSACTION;
INSERT INTO `{table_id}`
VALUES ("one", 1), ("two", 2), ("three", 3), ("four", 4);
UPDATE `{table_id}`
SET bar = bar + 1
WHERE bar > 2;
COMMIT TRANSACTION;
"""
query_job = Config.CLIENT.query(sql)
query_job.result()
# Transaction ID set by the server should be accessible
> assert query_job.transaction_info is not None
E AssertionError: assert None is not None
E + where None = <google.cloud.bigquery.job.query.QueryJob object at 0x7fa1b2732610>.transaction_info
tests/system/test_client.py:1583: AssertionError
Without a job ID, there's little I can do to investigate further.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.