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

fix: copy credentials in internal config#1052

Merged
kjin merged 1 commit intogoogleapis:masterfrom
kjin:copy-credentials
Jun 26, 2019
Merged

fix: copy credentials in internal config#1052
kjin merged 1 commit intogoogleapis:masterfrom
kjin:copy-credentials

Conversation

@kjin
Copy link
Copy Markdown
Contributor

@kjin kjin commented Jun 24, 2019

Fixes #1048

@kjin kjin requested a review from a team June 24, 2019 23:44
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 24, 2019
@kjin kjin removed the request for review from a team June 24, 2019 23:52
Comment thread src/index.ts Outdated
@kjin kjin force-pushed the copy-credentials branch from ceb8db7 to 0a219f6 Compare June 25, 2019 00:23
@kjin kjin force-pushed the copy-credentials branch from 0a219f6 to 2555b2a Compare June 25, 2019 00:37
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 25, 2019

Codecov Report

Merging #1052 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1052      +/-   ##
==========================================
+ Coverage   94.85%   94.86%   +0.01%     
==========================================
  Files          96       96              
  Lines        6311     6326      +15     
  Branches      496      496              
==========================================
+ Hits         5986     6001      +15     
  Misses        166      166              
  Partials      159      159
Impacted Files Coverage Δ
src/trace-writer.ts 92.5% <ø> (ø) ⬆️
src/index.ts 89.28% <ø> (ø) ⬆️
test/test-trace-writer.ts 98.45% <ø> (ø) ⬆️
test/test-trace-api.ts 100% <ø> (ø) ⬆️
test/test-config.ts 92.64% <100%> (+2.08%) ⬆️
src/tracing.ts 90% <100%> (ø) ⬆️
test/test-config-priority.ts 95.91% <100%> (ø) ⬆️
test/trace.ts 93.5% <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 178c2a9...2555b2a. Read the comment docs.

1 similar comment
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 25, 2019

Codecov Report

Merging #1052 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1052      +/-   ##
==========================================
+ Coverage   94.85%   94.86%   +0.01%     
==========================================
  Files          96       96              
  Lines        6311     6326      +15     
  Branches      496      496              
==========================================
+ Hits         5986     6001      +15     
  Misses        166      166              
  Partials      159      159
Impacted Files Coverage Δ
src/trace-writer.ts 92.5% <ø> (ø) ⬆️
src/index.ts 89.28% <ø> (ø) ⬆️
test/test-trace-writer.ts 98.45% <ø> (ø) ⬆️
test/test-trace-api.ts 100% <ø> (ø) ⬆️
test/test-config.ts 92.64% <100%> (+2.08%) ⬆️
src/tracing.ts 90% <100%> (ø) ⬆️
test/test-config-priority.ts 95.91% <100%> (ø) ⬆️
test/trace.ts 93.5% <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 178c2a9...2555b2a. Read the comment docs.

Comment thread src/index.ts
authOptions: Object.assign({}, mergedConfig, {
projectId: lastOf<string | undefined>(
mergedConfig.projectId,
process.env.GCLOUD_PROJECT
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't the auth library already consult this environment variable?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, we do.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unfortunate but I realized that Trace Agent has historically regarded GCLOUD_PROJECT as taking precedence over the projectId config option, while the auth library does the opposite. Maybe it's possible that we change this now, though.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be semver major :/. Not worth it.

Comment thread src/index.ts
authOptions: Object.assign({}, mergedConfig, {
projectId: lastOf<string | undefined>(
mergedConfig.projectId,
process.env.GCLOUD_PROJECT
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be semver major :/. Not worth it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyFilename credentials not copied in internal config

4 participants