Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.

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

Merged
laljikanjareeya merged 2 commits into
googleapis:masterfrom
laljikanjareeya:getmetadata-location-issue
Dec 9, 2020
Merged

laljikanjareeya merged 2 commits into
googleapis:masterfrom
laljikanjareeya:getmetadata-location-issue

Conversation

@laljikanjareeya

@laljikanjareeya laljikanjareeya commented Dec 2, 2020 •

Copy link
Copy Markdown
Contributor

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 review from a team and steffnay 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

codecov Bot commented Dec 2, 2020 •

Copy link
Copy Markdown

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.

Comment thread src/job.ts Resolved
@mbyrne00

mbyrne00 commented Dec 3, 2020

Copy link
Copy Markdown

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

google-cla Bot commented Dec 8, 2020

Copy link
Copy Markdown

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
@laljikanjareeya
laljikanjareeya force-pushed the getmetadata-location-issue branch from 8537948 to a422fc7 Compare December 8, 2020 12:38
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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