Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
ranchodeluxe committed Mar 7, 2024
1 parent 3a4b833 commit a1a0bfc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
17 changes: 14 additions & 3 deletions .github/workflows/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
import os
import boto3


# assume our designated pangeo-runner dep injected role for s3 write access
sts_client = boto3.client('sts')
assumed_role = sts_client.assume_role(
RoleArn="arn:aws:iam::444055461661:role/test-pangeo-forge-runner-s3-write-role",
RoleSessionName="veda-pforge-s3-dep-injection"
)
tmp_credentials = assumed_role['Credentials']


def calc_task_manager_resources(task_manager_process_memory):
"""
Expand Down Expand Up @@ -134,9 +145,9 @@ def calc_task_manager_resources(task_manager_process_memory):
# and our runner workflow would need to not only assume the GH actions role but then another role
# that has permissions to s3. Doing this for now b/c we're short on time
c.TargetStorage.fsspec_args = {
"key": os.environ.get("AWS_ACCESS_KEY_ID"),
"secret": os.environ.get("AWS_SECRET_ACCESS_KEY"),
"token": os.environ.get("AWS_SESSION_TOKEN"),
"key": tmp_credentials['AccessKeyId'],
"secret": tmp_credentials['SecretAccessKey'],
"token": tmp_credentials['SessionToken'],
"anon": False,
"client_kwargs": {"region_name": "us-west-2"},
}
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/job-runner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ jobs:
OUTPUT_BUCKET: ${{ vars.OUTPUT_BUCKET }}
AUTH_MODE: ${{ github.event.inputs.auth_mode }}
RESOURCE_PROFILE: ${{ github.event.inputs.resource_profile }}
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
AWS_SESSION_TOKEN: ${{ env.AWS_SESSION_TOKEN }}

- name: cleanup if "pangeo-forge-runner bake" failed
if: steps.executejob.outcome == 'failure'
Expand Down

0 comments on commit a1a0bfc

Please sign in to comment.