From 8bbd9112d035bb6d54e411e6da39a80de68597eb Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Fri, 31 Mar 2023 14:00:09 -0400 Subject: [PATCH] Don't be so strict about setting HYDRO_* env vars (#36090) --- .github/workflows/azure-preview-env-deploy.yml | 2 -- src/events/hydro.js | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/azure-preview-env-deploy.yml b/.github/workflows/azure-preview-env-deploy.yml index 948f282b3f..6b8b322b36 100644 --- a/.github/workflows/azure-preview-env-deploy.yml +++ b/.github/workflows/azure-preview-env-deploy.yml @@ -192,8 +192,6 @@ jobs: cache-to: '' build-args: | BUILD_SHA=${{ env.COMMIT_REF }} - HYDRO_SECRET= - HYDRO_ENDPOINT= # Succeed despite any non-zero exit code (e.g. if there is no deployment to cancel) - name: 'Cancel any existing deployments for this PR' diff --git a/src/events/hydro.js b/src/events/hydro.js index ae3f3a0e14..11fef75ae9 100644 --- a/src/events/hydro.js +++ b/src/events/hydro.js @@ -15,7 +15,9 @@ const httpsAgent = new Agent({ keepAlive: true, maxSockets: 32 }) // keepAlive: const { NODE_ENV, HYDRO_SECRET, HYDRO_ENDPOINT } = process.env if (NODE_ENV === 'production' && (isNil(HYDRO_SECRET) || isNil(HYDRO_ENDPOINT))) { - throw new Error('Configure Hydro before sending events') + console.warn( + 'Running in production but HYDRO_SECRET and HYDRO_ENDPOINT environment variables are not set.' + ) } /*