GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BigQuery: Cannot list jobs when there has been an invalid job request · Issue #3178 · googleapis/google-cloud-java

BigQuery: Cannot list jobs when there has been an invalid job request #3178

New issue
Copy link
New issue
Copy link
Closed
Closed
BigQuery: Cannot list jobs when there has been an invalid job request#3178
Copy link
Assignees
pongad
Labels
api: bigqueryIssues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Description

@alixhami
alixhami
opened on Apr 20, 2018
Issue body actions

I recently ran an invalid job outside of the Java BigQuery client library, and when I try to list jobs when running the BigQuery samples tests with the Java client library, I get an error:

Running com.google.cloud.examples.bigquery.snippets.ITBigQuerySnippets
Tests run: 15, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 162.203 sec <<< FAILURE! - in com.google.cloud.examples.bigquery.snippets.ITBigQuerySnippets
testJob(com.google.cloud.examples.bigquery.snippets.ITBigQuerySnippets)  Time elapsed: 1.602 sec  <<< ERROR!
java.lang.IllegalArgumentException: value must be set if and only if the type is not ARRAY
	at com.google.cloud.examples.bigquery.snippets.ITBigQuerySnippets.testJob(ITBigQuerySnippets.java:273)

This error comes from from the Java BigQuery client library when it attempts to build an invalid job (error defined here)

This issue is similar to one we fixed in Python. The solution we used was to not validate Job objects as they are created from the API, which allowed invalid jobs from the API to be constructed into Job objects.

Activity

  1. alixhami
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: bigqueryIssues related to the BigQuery API.
    on Apr 20, 2018
  2. alixhami commented on Apr 20, 2018

    @alixhami
    alixhami
    on Apr 20, 2018
    ContributorAuthor
    More actions

    cc @tswast

  3. tswast commented on Apr 20, 2018

    @tswast
    tswast
    on Apr 20, 2018
    Contributor
    More actions

    Presumably Java will need a slightly different solution from what we did in Python, as it is statically typed and can't really delay when it attempts to parse the various properties from the API response (or maybe I'm wrong about that?).

    The Job resource provides a status.errors[] list (exposed in Java as JobStatus.getExecutionErrors()), so maybe we could parse to a default value in the case of errors with the expectation that they can check this property when listing / getting a failed job.

  4. pongad
    self-assigned this
    on Apr 20, 2018
  5. pongad commented on Apr 20, 2018

    @pongad
    pongad
    on Apr 20, 2018
    Contributor
    More actions

    @tswast I could be wrong but I'm not sure that would work. I think there's a race between the job finishing (either failing or erroring) and calling get/list.

    For example, we could call get() , attempt to construct the QueryJobConfiguration object, and throw this exception before BigQuery realizes that the job fails. We could wait for the job to get to RUNNING or DONE state before trying to parse the configuration but I think this sounds like a breaking change. The user could count on the configuration always existing before.

    I think another way out is to allow creation of invalid QueryParameterValue jobs. We can provide isValid method and document that we allow creating invalid jobs for the reasons in the issue.

  6. tswast commented on Apr 20, 2018

    @tswast
    tswast
    on Apr 20, 2018
    Contributor
    More actions

    I think another way out is to allow creation of invalid QueryParameterValue jobs. We can provide isValid method and document that we allow creating invalid jobs for the reasons in the issue.

    This doesn't cover the general case that it might be possible to create other kinds of bad job resources (having trouble of thinking what those would be), but it'll at least allow Alix and I to be able to run the system tests again.

  7. pongad
    closed this as completedin #3179on Apr 20, 2018
  8. pongad
    added a commit that references this issue on Apr 20, 2018

    bigquery: remove QueryParameterValue validation (#3179)

    This issue will close once commit 332583c is merged into the 'main' branch.
    332583c
  9. theacodes
    unassigned
    pongad
    on Sep 28, 2018
  10. JustinBeckwith
    assigned
    pongad
    on Feb 1, 2021
  11. chingor13
    added a commit that references this issue on Feb 3, 2026

    deps: update dependency com.google.cloud:sdk-platform-java-config to …

    8437b7e
  12. suztomo
    added 2 commits that reference this issue on Mar 9, 2026

    deps: update github/codeql-action action to v2.24.6 (#3178)

    8843cae

    chore(main): release 2.38.2 (#3191)

    b12139c
  13. lqiu96
    added a commit that references this issue on Mar 20, 2026

    deps: update dependency com.google.cloud:sdk-platform-java-config to …

    80fb641
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @pongad
    pongad

Labels

api: bigqueryIssues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.