From 4cd1f05547ddcfb606d13a9e4e9b7cb1c181c012 Mon Sep 17 00:00:00 2001 From: Anthony Volk Date: Fri, 26 Jan 2024 01:15:43 +0200 Subject: [PATCH 1/3] fix: Repair env var name --- gcp/export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcp/export.py b/gcp/export.py index e1cce79..2e9d783 100644 --- a/gcp/export.py +++ b/gcp/export.py @@ -14,7 +14,7 @@ TEST_TOKEN = os.environ["AUTH0_TEST_TOKEN_NO_DOMAIN"] DB_USER = os.environ["USER_ANALYTICS_DB_USERNAME"] DBPW = os.environ["USER_ANALYTICS_DB_PASSWORD"] -DB_CONN = os.environ["USER_ANALYTICS_DB_CONNECTION"] +DB_CONN = os.environ["USER_ANALYTICS_DB_CONNECTION_NAME"] # Export GAE to to .gac.json From 7489be9698a013fb09b1d2c7b0230b593d4a03c5 Mon Sep 17 00:00:00 2001 From: Anthony Volk Date: Fri, 26 Jan 2024 01:19:31 +0200 Subject: [PATCH 2/3] fix: Change env var name --- .github/workflows/pr.yml | 2 +- .github/workflows/push.yml | 2 +- gcp/policyengine_household_api/Dockerfile | 2 +- policyengine_household_api/data/setup.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 8346e06..22c6ef2 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -56,4 +56,4 @@ jobs: AUTH0_TEST_TOKEN_NO_DOMAIN: ${{ secrets.AUTH0_TEST_TOKEN_NO_DOMAIN }} USER_ANALYTICS_DB_USERNAME: ${{ secrets.USER_ANALYTICS_DB_USERNAME }} USER_ANALYTICS_DB_PASSWORD: ${{ secrets.USER_ANALYTICS_DB_PASSWORD }} - USER_ANALYTICS_CONNECTION_NAME: ${{ secrets.USER_ANALYTICS_CONNECTION_NAME }} + USER_ANALYTICS_DB_CONNECTION_NAME: ${{ secrets.USER_ANALYTICS_DB_CONNECTION_NAME }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1f895c2..2b80586 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -73,4 +73,4 @@ jobs: AUTH0_TEST_TOKEN_NO_DOMAIN: ${{ secrets.AUTH0_TEST_TOKEN_NO_DOMAIN }} USER_ANALYTICS_DB_USERNAME: ${{ secrets.USER_ANALYTICS_DB_USERNAME }} USER_ANALYTICS_DB_PASSWORD: ${{ secrets.USER_ANALYTICS_DB_PASSWORD }} - USER_ANALYTICS_CONNECTION_NAME: ${{ secrets.USER_ANALYTICS_CONNECTION_NAME }} + USER_ANALYTICS_DB_CONNECTION_NAME: ${{ secrets.USER_ANALYTICS_DB_CONNECTION_NAME }} diff --git a/gcp/policyengine_household_api/Dockerfile b/gcp/policyengine_household_api/Dockerfile index c4158c2..50d5e9d 100644 --- a/gcp/policyengine_household_api/Dockerfile +++ b/gcp/policyengine_household_api/Dockerfile @@ -5,7 +5,7 @@ ENV AUTH0_AUDIENCE_NO_DOMAIN .audience ENV AUTH0_TEST_TOKEN_NO_DOMAIN .test-token ENV USER_ANALYTICS_DB_PASSWORD .dbpw ENV USER_ANALYTICS_DB_USERNAME .dbuser -ENV USER_ANALYTICS_CONNECTION_NAME .dbconn +ENV USER_ANALYTICS_DB_CONNECTION_NAME .dbconn ADD . /app RUN cd /app && make install && make test CMD ./start.sh diff --git a/policyengine_household_api/data/setup.py b/policyengine_household_api/data/setup.py index 36bb060..645d82d 100644 --- a/policyengine_household_api/data/setup.py +++ b/policyengine_household_api/data/setup.py @@ -12,7 +12,7 @@ def getconn(): conn = connector.connect( - os.getenv("USER_ANALYTICS_CONNECTION_NAME"), + os.getenv("USER_ANALYTICS_DB_CONNECTION_NAME"), "pymysql", user=os.getenv("USER_ANALYTICS_DB_USERNAME"), password=os.getenv("USER_ANALYTICS_DB_PASSWORD"), From 0378baa9c8dde896cf4f9b28ba8e364ada3a5816 Mon Sep 17 00:00:00 2001 From: Anthony Volk Date: Fri, 26 Jan 2024 01:21:42 +0200 Subject: [PATCH 3/3] chore: Changelog --- changelog_entry.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog_entry.yaml b/changelog_entry.yaml index 0c462ac..e1527fa 100644 --- a/changelog_entry.yaml +++ b/changelog_entry.yaml @@ -1,4 +1,4 @@ - bump: minor changes: added: - - User analytics tracking \ No newline at end of file + - Fix environment variables \ No newline at end of file