Skip to content

Commit 1743e40

Browse files
NikhilSinha1Nikhil Sinha
andauthored
Fix integration tests (#2660)
* Fix integration tests * Comment update --------- Co-authored-by: Nikhil Sinha <nsinha@cloudflare.com>
1 parent 2ad2c7f commit 1743e40

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

pkg/image/build.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ func Build(
8686
var cogBaseImageName string
8787

8888
tmpImageId := imageName
89-
if strings.HasPrefix(imageName, "r8.im") {
89+
isR8imImage := strings.HasPrefix(imageName, "r8.im")
90+
if isR8imImage {
9091
hash := sha256.New()
9192
_, err := hash.Write([]byte(imageName))
9293
if err != nil {
@@ -327,9 +328,13 @@ func Build(
327328
return fmt.Errorf("Failed to add labels to image: %w", err)
328329
}
329330

330-
if err = dockerCommand.RemoveImage(ctx, tmpImageId); err != nil {
331-
return err
331+
// We created a temp image, so delete it. Don't "-f" so it doesn't blow anything up
332+
if isR8imImage {
333+
if err = dockerCommand.RemoveImage(ctx, tmpImageId); err != nil {
334+
return err
335+
}
332336
}
337+
333338
return nil
334339
}
335340

python/cog/server/worker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,6 @@ async def _healthcheck_internal(
846846
"User-defined healthcheck timed out",
847847
timeout_secs=HEALTHCHECK_TIMEOUT,
848848
)
849-
log.warn(f"Healthcheck timed out after {HEALTHCHECK_TIMEOUT} seconds")
850849
except Exception as e:
851850
done.error = True
852851
done.error_detail = f"Healthcheck failed: {str(e)}"

0 commit comments

Comments
 (0)