From 89c6d8cd04ef1104fa597c63c914e22871c97234 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 02:31:15 +0000 Subject: [PATCH 1/5] chore(deps): bump prismjs from 1.25.0 to 1.27.0 in /microsite Bumps [prismjs](https://github.com/PrismJS/prism) from 1.25.0 to 1.27.0. - [Release notes](https://github.com/PrismJS/prism/releases) - [Changelog](https://github.com/PrismJS/prism/blob/master/CHANGELOG.md) - [Commits](https://github.com/PrismJS/prism/compare/v1.25.0...v1.27.0) --- updated-dependencies: - dependency-name: prismjs dependency-type: indirect ... Signed-off-by: dependabot[bot] --- microsite/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/microsite/yarn.lock b/microsite/yarn.lock index 81d28c7ab7..1f68a78726 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -5215,9 +5215,9 @@ prettier@^2.5.1: integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== prismjs@^1.22.0: - version "1.25.0" - resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.25.0.tgz#6f822df1bdad965734b310b315a23315cf999756" - integrity sha512-WCjJHl1KEWbnkQom1+SzftbtXMKQoezOCYs5rECqMN+jP+apI7ftoflyqigqzopSO3hMhTEb0mFClA8lkolgEg== + version "1.27.0" + resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.27.0.tgz#bb6ee3138a0b438a3653dd4d6ce0cc6510a45057" + integrity sha512-t13BGPUlFDR7wRB5kQDG4jjl7XeuH6jbJGt11JHPL96qwsEHNX2+68tFXqc1/k+/jALsbSWJKUOT/hcYAZ5LkA== process-nextick-args@~2.0.0: version "2.0.1" From ac25a0f5770ca577e6f9d324171a47e2a62c5e99 Mon Sep 17 00:00:00 2001 From: Jeremy Guarini Date: Fri, 25 Feb 2022 13:48:07 -0800 Subject: [PATCH 2/5] When using GCS for the techdocs storage and not setting the GOOGLE_APPLICATION_CREDENTIALS environment variable, authentication and accessing the bucket fails due to the project ID not being found. Relevant log output ``` techdocs error from GCS client library: Unable to detect a Project Id in the current environment. ``` By adding the projectID when initializing the Storage client, this should fix the issue. This current approach expects the project_id to be in the json credentials, which it usually is. Another option would be to re-add the app-config projectID value back and allow users to specify the projectID that way as well. Signed-off-by: Jeremy Guarini --- packages/techdocs-common/src/stages/publish/googleStorage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/techdocs-common/src/stages/publish/googleStorage.ts b/packages/techdocs-common/src/stages/publish/googleStorage.ts index f072412c20..45ecb32cf7 100644 --- a/packages/techdocs-common/src/stages/publish/googleStorage.ts +++ b/packages/techdocs-common/src/stages/publish/googleStorage.ts @@ -82,7 +82,7 @@ export class GoogleGCSPublish implements PublisherBase { const credentials = config.getOptionalString( 'techdocs.publisher.googleGcs.credentials', ); - let credentialsJson = {}; + let credentialsJson: any = {}; if (credentials) { try { credentialsJson = JSON.parse(credentials); @@ -95,6 +95,7 @@ export class GoogleGCSPublish implements PublisherBase { const storageClient = new Storage({ ...(credentials && { + projectId: credentialsJson.project_id, credentials: credentialsJson, }), }); From 955be6bc7d7b5629c8be150824be632527dd2e5c Mon Sep 17 00:00:00 2001 From: Jeremy Guarini Date: Fri, 25 Feb 2022 13:59:40 -0800 Subject: [PATCH 3/5] add changeset Signed-off-by: Jeremy Guarini --- .changeset/swift-rules-hunt.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/swift-rules-hunt.md diff --git a/.changeset/swift-rules-hunt.md b/.changeset/swift-rules-hunt.md new file mode 100644 index 0000000000..15707bbf90 --- /dev/null +++ b/.changeset/swift-rules-hunt.md @@ -0,0 +1,5 @@ +--- +'@backstage/techdocs-common': patch +--- + +adds passing projectID to the Storage client From f397aa093015413499ed88612d6e8a9e1503c1c6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 08:51:53 +0000 Subject: [PATCH 4/5] chore(deps): bump url-parse from 1.5.7 to 1.5.10 in /microsite Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- microsite/yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/microsite/yarn.lock b/microsite/yarn.lock index 1f68a78726..a9161f57fd 100644 --- a/microsite/yarn.lock +++ b/microsite/yarn.lock @@ -6499,9 +6499,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.4.3: - version "1.5.7" - resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.7.tgz#00780f60dbdae90181f51ed85fb24109422c932a" - integrity sha512-HxWkieX+STA38EDk7CE9MEryFeHCKzgagxlGvsdS7WBImq9Mk+PGwiT56w82WI3aicwJA8REp42Cxo98c8FZMA== + version "1.5.10" + resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0" From 2225dc9a09a319dc730a82d5bffbc416613c93f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 26 Feb 2022 09:41:29 +0000 Subject: [PATCH 5/5] chore(deps): bump url-parse from 1.5.7 to 1.5.10 Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.7 to 1.5.10. - [Release notes](https://github.com/unshiftio/url-parse/releases) - [Commits](https://github.com/unshiftio/url-parse/compare/1.5.7...1.5.10) --- updated-dependencies: - dependency-name: url-parse dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6cb525a71e..997e55c9e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -24729,9 +24729,9 @@ url-parse-lax@^3.0.0: prepend-http "^2.0.0" url-parse@^1.5.3: - version "1.5.7" - resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.7.tgz#00780f60dbdae90181f51ed85fb24109422c932a" - integrity sha512-HxWkieX+STA38EDk7CE9MEryFeHCKzgagxlGvsdS7WBImq9Mk+PGwiT56w82WI3aicwJA8REp42Cxo98c8FZMA== + version "1.5.10" + resolved "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz#9d3c2f736c1d75dd3bd2be507dcc111f1e2ea9c1" + integrity sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ== dependencies: querystringify "^2.1.1" requires-port "^1.0.0"