Skip to content

Commit 9e8ee68

Browse files
committed
more changes
1 parent 7fa996b commit 9e8ee68

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/datasmith/docker/validation.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -187,23 +187,23 @@ def validate_one( # noqa: C901
187187
if client.images.get(task.get_image_name()):
188188
# remove the image
189189
logger.debug("validate_one: image %s already exists, removing image...", task.get_image_name())
190-
client.images.remove(image=task.get_image_name(), force=True)
191-
logger.debug("validate_one: removed image %s", task.get_image_name())
192-
# return {
193-
# "owner": task.owner,
194-
# "repo": task.repo,
195-
# "sha": task.sha,
196-
# "image_name": task.get_image_name(),
197-
# "stage": "build-skipped",
198-
# "ok": True,
199-
# "rc": 0,
200-
# "duration_s": 0.0,
201-
# "cmd_build": f"docker image {task.get_image_name()} (skipped)",
202-
# "cmd_run": "",
203-
# "stderr_tail": "",
204-
# "stdout_tail": "",
205-
# "files": {},
206-
# }
190+
# client.images.remove(image=task.get_image_name(), force=True)
191+
# logger.debug("validate_one: removed image %s", task.get_image_name())
192+
return {
193+
"owner": task.owner,
194+
"repo": task.repo,
195+
"sha": task.sha,
196+
"image_name": task.get_image_name(),
197+
"stage": "build-skipped",
198+
"ok": True,
199+
"rc": 0,
200+
"duration_s": 0.0,
201+
"cmd_build": f"docker image {task.get_image_name()} (skipped)",
202+
"cmd_run": "",
203+
"stderr_tail": "",
204+
"stdout_tail": "",
205+
"files": {},
206+
}
207207
docker_ctx = context_registry.get(task)
208208
if docker_ctx == context_registry.get_default():
209209
_, docker_ctx = context_registry.get_similar(task)[0]
@@ -248,7 +248,7 @@ def validate_one( # noqa: C901
248248
profile_ok, profile_preview = _run_quick_profile(client=client, image_name=task.get_image_name(), timeout=600)
249249
if not profile_ok:
250250
logger.warning(
251-
"validate_one: failed container %s exited with code %s. Removing image.", task.get_container_name()
251+
"validate_one: failed container %s exited with code. Removing image.", task.get_container_name()
252252
)
253253
# remove the image if the container failed
254254
try:

0 commit comments

Comments
 (0)