Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support forwarding env vars from miniwdl's env to tasks #516

Closed
wants to merge 2 commits into from

Conversation

jgadling
Copy link
Contributor

Motivation

We're running miniwdl as part of our AWS batch pipelines, and some of the tasks in our pipelines need to be able to fetch secrets from AWS Secrets Manager. In order for our tasks to be able to assume the correct role (the role associated with the Batch task), we need the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI environment variable forwarded from miniwdl's environment into the task's environment.

Since we have no control over the value of this environment variable, there's no way for us to specify it as an input to miniwdl. Many other compute environments pass important context via env vars to the containers they run, so I suspect this functionality will be useful beyond just AWS Batch.

Approach

This PR allows users to specify a list of env vars that will be forwarded from miniwdl's execution environment into the environment of all containers launched via miniwdl.

Checklist

  • Add appropriate test(s) to the automatic suite
  • Use make pretty to reformat the code with black
  • Use make check to statically check the code using Pyre and Pylint
  • Send PR from a dedicated branch without unrelated edits
  • Ensure compatibility with this project's MIT license

@mlin mlin added this to In progress in miniwdl via automation Jul 24, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build 1061928393

  • 8 of 10 (80.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.009%) to 96.479%

Changes Missing Coverage Covered Lines Changed/Added Lines %
WDL/runtime/task.py 8 10 80.0%
Totals Coverage Status
Change from base Build 1061778500: -0.009%
Covered Lines: 6713
Relevant Lines: 6958

💛 - Coveralls

@jgadling jgadling closed this Jul 26, 2021
miniwdl automation moved this from In progress to Done Jul 26, 2021
@jgadling
Copy link
Contributor Author

Closed in favor of #517

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
miniwdl
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants