Skip to content

Commit

Permalink
Unse vars
Browse files Browse the repository at this point in the history
  • Loading branch information
xneyder committed Oct 22, 2024
1 parent 4a31990 commit 1c86896
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/ci-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,14 +275,6 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Clear AWS environment variables
run: |
echo "AWS_DEFAULT_REGION=''" >> $GITHUB_ENV
echo "AWS_REGION=''" >> $GITHUB_ENV
echo "AWS_ACCESS_KEY_ID=''" >> $GITHUB_ENV
echo "AWS_SECRET_ACCESS_KEY=''" >> $GITHUB_ENV
echo "AWS_SESSION_TOKEN=''" >> $GITHUB_ENV
- uses: ./.github/actions/run-backend-tests
if: needs.changes.outputs.backend == 'true'
with:
Expand Down
12 changes: 12 additions & 0 deletions posthog/temporal/tests/data_imports/test_end_to_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import aioboto3
import functools
import uuid
import os
from asgiref.sync import sync_to_async
from django.conf import settings
from django.test import override_settings
Expand Down Expand Up @@ -81,6 +82,17 @@ async def minio_client():
Yields the client after creating a bucket. Upon resuming, we delete
the contents and the bucket itself.
"""
# Unset AWS-related environment variables to prevent conflicts
os.environ.pop("AWS_ACCESS_KEY_ID", None)
os.environ.pop("AWS_SECRET_ACCESS_KEY", None)
os.environ.pop("AWS_SESSION_TOKEN", None)
os.environ.pop("AWS_DEFAULT_REGION", None)
os.environ.pop("AWS_REGION", None)
os.environ.pop("AWS_ROLE_ARN", None)
os.environ.pop("AWS_ROLE_SESSION_NAME", None)
os.environ.pop("AWS_CREDENTIAL_EXPIRATION", None)
os.environ.pop("AWS_PROFILE", None)

async with create_test_client(
"s3",
aws_access_key_id=settings.OBJECT_STORAGE_ACCESS_KEY_ID,
Expand Down

0 comments on commit 1c86896

Please sign in to comment.