From 6a9b9d0f7c1eca836bb52687921308a6cf5bce61 Mon Sep 17 00:00:00 2001 From: Martina Iglesias Fernandez Date: Mon, 29 Mar 2021 10:14:52 +0200 Subject: [PATCH] Fix some comments Signed-off-by: Martina Iglesias Fernandez --- app-config.yaml | 10 ++++------ .../backend-common/src/reading/GoogleGcsUrlReader.ts | 9 ++++----- packages/integration/config.d.ts | 2 +- packages/integration/src/googleGcs/index.ts | 1 - 4 files changed, 9 insertions(+), 13 deletions(-) diff --git a/app-config.yaml b/app-config.yaml index 3dc071c85c..48d58dc837 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -122,12 +122,6 @@ kafka: - localhost:9092 integrations: - googleGcs: - clientEmail: - $env: GCS_CLIENT_EMAIL - privateKey: - $env: GCS_PRIVATE_KEY - github: - host: github.com token: @@ -156,6 +150,10 @@ integrations: - host: dev.azure.com token: $env: AZURE_TOKEN +# googleGcs: +# clientEmail: +# $env: GCS_CLIENT_EMAIL +# privateKey: 'example@example.com' catalog: rules: diff --git a/packages/backend-common/src/reading/GoogleGcsUrlReader.ts b/packages/backend-common/src/reading/GoogleGcsUrlReader.ts index 80b42dd5da..a05a41e54a 100644 --- a/packages/backend-common/src/reading/GoogleGcsUrlReader.ts +++ b/packages/backend-common/src/reading/GoogleGcsUrlReader.ts @@ -22,10 +22,9 @@ import { UrlReader, } from './types'; import getRawBody from 'raw-body'; -import { - GOOGLE_GCS_HOST, - readGoogleGcsIntegrationConfig, -} from '@backstage/integration'; +import { readGoogleGcsIntegrationConfig } from '@backstage/integration'; + +const GOOGLE_GCS_HOST = 'storage.cloud.google.com'; const parseURL = ( url: string, @@ -81,7 +80,7 @@ export class GoogleGcsUrlReader implements UrlReader { this.storage.bucket(bucket).file(key).createReadStream(), ); } catch (error) { - throw new Error(`unable to read gcs file from ${url}`); + throw new Error(`unable to read gcs file from ${url}, ${error}`); } } diff --git a/packages/integration/config.d.ts b/packages/integration/config.d.ts index 9f9d588f0b..ddc84ae011 100644 --- a/packages/integration/config.d.ts +++ b/packages/integration/config.d.ts @@ -154,7 +154,7 @@ export interface Config { googleGcs?: { /** * Service account email used to authenticate requests. - * @visibility secret + * @visibility backend */ clientEmail?: string; /** diff --git a/packages/integration/src/googleGcs/index.ts b/packages/integration/src/googleGcs/index.ts index ac85d706b5..d9355fd299 100644 --- a/packages/integration/src/googleGcs/index.ts +++ b/packages/integration/src/googleGcs/index.ts @@ -16,4 +16,3 @@ export { readGoogleGcsIntegrationConfig } from './config'; export type { GoogleGcsIntegrationConfig } from './config'; -export const GOOGLE_GCS_HOST = 'storage.cloud.google.com';