Skip to content

Commit

Permalink
Merge pull request #64 from opensafely-core/update-dependencies
Browse files Browse the repository at this point in the history
fix: Update to opensafely-jobrunner v2.26.4
  • Loading branch information
evansd authored Sep 2, 2021
2 parents 2421b8c + 78b584e commit bd1c02b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions opensafely/_vendor/jobrunner/cli/local_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,21 +255,23 @@ def create_and_run_jobs(

docker_images = get_docker_images(jobs)

stata_images = [i for i in docker_images if i.startswith("stata-mp")]
if stata_images and config.STATA_LICENSE is None:
uses_stata = any(
i.startswith(f"{config.DOCKER_REGISTRY}/stata-mp:") for i in docker_images
)
if uses_stata and config.STATA_LICENSE is None:
config.STATA_LICENSE = get_stata_license()
if config.STATA_LICENSE is None:
print(
f"The docker image '{stata_images[0]}' requires a license to function.\n"
f"\n"
f"If you are a member of OpenSAFELY we should have been able to fetch\n"
f"the license automatically, so something has gone wrong. Please open\n"
f"a new discussion here so we can help:\n"
f" https://github.com/opensafely/documentation/discussions\n"
f"\n"
f"If you are not a member of OpenSAFELY you will have to provide your\n"
f"own license. See the dicussion here for pointers:\n"
f" https://github.com/opensafely/documentation/discussions/299"
"The docker image 'stata-mp' requires a license to function.\n"
"\n"
"If you are a member of OpenSAFELY we should have been able to fetch\n"
"the license automatically, so something has gone wrong. Please open\n"
"a new discussion here so we can help:\n"
" https://github.com/opensafely/documentation/discussions\n"
"\n"
"If you are not a member of OpenSAFELY you will have to provide your\n"
"own license. See the dicussion here for pointers:\n"
" https://github.com/opensafely/documentation/discussions/299"
)
return False

Expand Down
2 changes: 1 addition & 1 deletion vendor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
certifi==2020.12.5 # via requests
chardet==4.0.0 # via requests
idna==2.10 # via requests
opensafely-jobrunner==2.26.3 # via -r vendor.in
opensafely-jobrunner==2.26.4 # via -r vendor.in
requests==2.25.1 # via opensafely-jobrunner
# ruamel.yaml.clib==0.2.6 # via ruamel.yaml
ruamel.yaml==0.17.4 # via opensafely-jobrunner
Expand Down

0 comments on commit bd1c02b

Please sign in to comment.