Repository navigation
Missing configuration for dryRun jobs causes NPE #525
Copy link
Copy link
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Milestone
Description
A query job created with dryRun = true has no configuration field. The following is the response I get from Jobs: insert.
{
"kind": "bigquery#job",
"etag": "\"Bop49sEVg6UBKwr7tLdL8AavHaw/LRPbO11E3VlTAE5UxM2F_Mfu01M\"",
"jobReference": {
"projectId": "gcloud-devel"
},
"status": {
"state": "DONE"
},
"statistics": {
"creationTime": "1452067884640",
"totalBytesProcessed": "26",
"query": {
"totalBytesProcessed": "26",
"totalBytesBilled": "0",
"cacheHit": false
}
}
}While if I create the same job with dryRun = false the configuration is present instead:
{
"kind": "bigquery#job",
"etag": "\"Bop49sEVg6UBKwr7tLdL8AavHaw/OI0lGTx2GlKc0VoAAYS-fIXHWok\"",
"id": "gcloud-devel:job_nixqXTMu-mS9U26Ixnxr9KZxCyc",
"selfLink": "https://www.googleapis.com/bigquery/v2/projects/gcloud-devel/jobs/job_nixqXTMu-mS9U26Ixnxr9KZxCyc",
"jobReference": {
"projectId": "gcloud-devel",
"jobId": "job_nixqXTMu-mS9U26Ixnxr9KZxCyc"
},
"configuration": {
"query": {
"query": "select StringField from gcloud_test_dataset_temp_6c127c49_9574_4e17_ad2b_8e85071997aa.testing_table",
"destinationTable": {
"projectId": "gcloud-devel",
"datasetId": "_6bb2fc157573f6bd0fed98f3b039c1e71f26d7d1",
"tableId": "anon5f489e91b602aaed3dc62a46d51ba3c070e5d03f"
},
"createDisposition": "CREATE_IF_NEEDED",
"writeDisposition": "WRITE_TRUNCATE"
},
"dryRun": false
},
"status": {
"state": "RUNNING"
},
"statistics": {
"creationTime": "1452070358348",
"startTime": "1452070358585"
},
"user_email": "..."
}While this does not affect the functionality itself I was wondering whether configuration should be returned also for dry-run jobs for consistency? /cc @jcondit @jtigani
For what concerns gcloud-java the absence of a configuration causes a NPE to be thrown at JobInfo:297.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Activity
jcondit commentedon Jan 6, 2016
Yeah, looks like a bug on our end. Thanks for the report!
polleyg commentedon Jan 12, 2017
Is there any ETA on a roll-out for this fix? I've just hit this bug.
http://stackoverflow.com/questions/41604995/bigquery-client-library-throwing-npe-when-setting-dryrun-to-true
jcondit commentedon Jan 12, 2017
I've pinged our internal bug to see if we can get the API behavior straightened out.
In the meantime, perhaps we can fix the NPE in the client library independently? @tswast
jcondit commentedon Jan 18, 2017
We've submitted a fix for this issue on the backend. It'll take a week or two to roll out.
tswast commentedon Feb 10, 2017
Marking as blocking GA, just to make sure we double check that this is working and close this out. Sorry I didn't have time to make a quick fix.
22 remaining items
chore(main): release 1.6.13-SNAPSHOT (#525)
chore(deps): update dependency com.google.cloud:google-cloud-logging …
build(java): update renovate config to mark conformance tests as a te…
chore: release 0.23.0 (#525)
chore(deps): update dependency com.google.cloud:google-cloud-logging …
chore: release 0.23.0 (#525)
deps: update dependency com.google.cloud:google-cloud-spanner-bom to …
chore: release 2.2.6 (googleapis#527)
deps: update dependency com.google.cloud:google-cloud-storage to v1.1…
chore: release 0.122.13 (#529)
deps: update dependency com.google.cloud:google-cloud-storage to v1.1…
chore: release 0.122.13 (#529)
chore: regenerate README (#525)
chore: regenerate README (#525)
chore: release 1.17.4-SNAPSHOT (googleapis#525)