Skip to content

Conversation

@stephenplusplus
Copy link
Contributor

Fixes #27

When we switched to GAPIC, we put a funnel method in front of all API requests before they were sent to GAPIC. From that, we get the projectId from google-auto-auth, to fill in any placeholders. We overlooked a scenario where a projectId is provided by the user already, such as when they are using a local emulator.

After this PR, we will honor that project ID, and not ask google-auto-auth to try to grab it from a credentials file (which is not generally provided when users are working from a local emulator).

scopes: v1.DatastoreClient.scopes,
servicePath: datastore.baseUrl_,
port: 443,
projectId: undefined,

This comment was marked as spam.

This comment was marked as spam.

@codecov
Copy link

codecov bot commented Dec 21, 2017

Codecov Report

Merging #28 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #28   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           5      5           
  Lines         643    645    +2     
=====================================
+ Hits          643    645    +2
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

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 b96beb7...1d2fea9. Read the comment docs.

this.namespace = options.namespace;

const userProvidedProjectId =
options.projectId || process.env.DATASTORE_PROJECT_ID;

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

test/index.js Outdated
);
});

it('should cache the correct projectId', function() {});

This comment was marked as spam.

This comment was marked as spam.

@alexander-fenster alexander-fenster merged commit 002e438 into master Dec 21, 2017
@stephenplusplus stephenplusplus deleted the spp--27 branch December 22, 2017 13:54
@stephenplusplus stephenplusplus mentioned this pull request Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants