Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update returned Job with API-determined location in getMetadata #900

Merged

Conversation

laljikanjareeya
Copy link
Contributor

@laljikanjareeya laljikanjareeya commented Dec 2, 2020

reqOpts of getMetadata has been set while initializing job object(constructor), once object initialized the there wasn't any impact of job's location changes in getMetadata's query string.

Location is passing currently in query string:

const bigquery = new BigQuery();
const job = new Job(bigquery, 'jobId', {
    location: 'australia-southeast1'
});

job.getMetadata((err, metadata, apiResponse) => { });

query string is undefined

const bigquery = new BigQuery();
const job = new Job(bigquery, 'jobId');
job.location = 'australia-southeast1';
job.getMetadata((err, metadata, apiResponse) => { });

Fixes #896

@laljikanjareeya laljikanjareeya requested a review from a team December 2, 2020 09:37
@laljikanjareeya laljikanjareeya requested a review from a team as a code owner December 2, 2020 09:37
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the googleapis/nodejs-bigquery API. label Dec 2, 2020
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Dec 2, 2020
@codecov
Copy link

codecov bot commented Dec 2, 2020

Codecov Report

Merging #900 (a422fc7) into master (a099bf0) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #900   +/-   ##
=======================================
  Coverage   98.68%   98.68%           
=======================================
  Files           9        9           
  Lines        7145     7155   +10     
  Branches      441      440    -1     
=======================================
+ Hits         7051     7061   +10     
  Misses         94       94           
Impacted Files Coverage Δ
src/job.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a099bf0...a422fc7. Read the comment docs.

@mbyrne00
Copy link

mbyrne00 commented Dec 3, 2020

I’m not sure if this suits the style/structure of your tests or not but a high level test to create a job in Australia (or any other non-us) and wait for it to complete would highlight the exact use case nicely to the next developer. Whichever combination caused job not found. I see the tests seem quite targeted for specific functions so if this doesn’t suit or is too much hassle feel free to ignore.

@google-cla
Copy link

google-cla bot commented Dec 8, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Dec 8, 2020
@google-cla google-cla bot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/nodejs-bigquery API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

table.load() fails to find its own job when location is not specified in v5.x API
3 participants