-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support container kwargs for celery-docker (#7335)
- Loading branch information
jamiedemaria
committed
Apr 8, 2022
1 parent
d344eed
commit ca8a616
Showing
6 changed files
with
95 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
python_modules/dagster-test/dagster_test/test_project/environments/env_environment_vars.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
solids: | ||
get_environment_solid: | ||
config: | ||
looking_for: FIND_ME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
python_modules/libraries/dagster-celery-docker/dagster_celery_docker_tests/conftest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import json | ||
import os | ||
|
||
import boto3 | ||
import pytest | ||
|
||
|
||
@pytest.fixture | ||
def aws_creds(): | ||
sm_client = boto3.client("secretsmanager", region_name="us-west-1") | ||
|
||
if os.environ.get("AWS_ACCESS_KEY_ID") and os.environ.get("AWS_SECRET_ACCESS_KEY"): | ||
return { | ||
"aws_access_key_id": os.environ.get("AWS_ACCESS_KEY_ID"), | ||
"aws_secret_access_key": os.environ.get("AWS_SECRET_ACCESS_KEY"), | ||
} | ||
|
||
try: | ||
creds = json.loads( | ||
sm_client.get_secret_value( | ||
SecretId=os.getenv("AWS_SSM_REFERENCE", "development/DOCKER_AWS_CREDENTIAL") | ||
).get("SecretString") | ||
) | ||
return creds | ||
except Exception as e: | ||
raise Exception( | ||
"Must have AWS credentials set to be able to run celery docker tests locally. Run " | ||
f"'aws sso login' to authenticate. Original error: {e}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters