44e7ef0b2b8218781b5fe7e2191b9790c42d73ec,app/grandchallenge/container_exec/tasks.py,,validate_docker_image_async,#,15
Before Change
instance.image.save(uploaded_image.name, File(f))
manifest = _extract_docker_image_file(model, instance, "manifest.json")
manifest = json.loads(manifest)
if len(manifest) != 1:
model.objects.filter(pk=pk).update(
status=(
f"The container image file should only have 1 image. "
f"This file contains {len(manifest)}."
)
)
raise ValidationError("Invalid Dockerfile")
image_sha256 = manifest[0]["Config"][:64]
config = _extract_docker_image_file(
model, instance, f"{image_sha256}.json"
)
After Change
with uploaded_image.open() as f:
instance.image.save(uploaded_image.name, File(f))
try:
image_sha256 = _validate_docker_image_manifest(
model=model, instance=instance
)
except ValidationError:
send_invalid_dockerfile_email(container_image=instance)
raise
model.objects.filter(pk=instance.pk).update(
image_sha256=f"sha256:{image_sha256}", ready=True
)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 9
Instances
Project Name: comic/grand-challenge.org
Commit Name: 44e7ef0b2b8218781b5fe7e2191b9790c42d73ec
Time: 2019-02-26
Author: code@jmsmkn.com
File Name: app/grandchallenge/container_exec/tasks.py
Class Name:
Method Name: validate_docker_image_async
Project Name: comic/grand-challenge.org
Commit Name: 44e7ef0b2b8218781b5fe7e2191b9790c42d73ec
Time: 2019-02-26
Author: code@jmsmkn.com
File Name: app/grandchallenge/container_exec/tasks.py
Class Name:
Method Name: validate_docker_image_async
Project Name: hyperspy/hyperspy
Commit Name: 1666e3ac5a46912b5e16f452e39bfdcf028e59ae
Time: 2019-05-09
Author: 14300780+ssomnath@users.noreply.github.com
File Name: hyperspy/io_plugins/usid_hdf5.py
Class Name:
Method Name: _get_dim_dict
Project Name: eth-cscs/reframe
Commit Name: b69c5b6bb1ad6c59de357b5a8729719b6fd3b749
Time: 2017-12-07
Author: karakasis@cscs.ch
File Name: reframe/core/modules.py
Class Name: Module
Method Name: __init__
Project Name: ray-project/ray
Commit Name: 92c2e41dfdb30756a5872578b38b34cd34722d76
Time: 2020-05-24
Author: dooku.wt@antfin.com
File Name: python/ray/state.py
Class Name: GlobalState
Method Name: profile_table