E

Docker Build Warning Context Canceled

Summary

The user is encountering a "context canceled" warning message during Docker builds, which occurs during a file copy operation in an Earthfile. Despite the warning, the builds complete successfully, leading the user to question its significance. They speculate that the warning may be related to retries, as they observe multiple attempts before success. The user also mentions finding references to Docker issuing this warning due to connection issues, wondering if it relates to BuildKit connection failures. They wish to revive the discussion on this topic.

Status
open
Tags
    Source
    #earthly
      r

      robbie.kershaw

      9/18/2024

      hazarding a guess here that since I see multiple that this is retries and in fact a 4th attempt succeeded :shrug: In other copy situations I get the copy line with no success etc so the assumption of success.. I did find some ref to docker sometimes issuing the context cancelled on connection issues, could this be trying to connect to the buildkit failing a few times then working?

      r

      robbie.kershaw

      9/18/2024

      bump this thread :zombie: to revive from the dead

      r

      robbie.kershaw

      9/18/2024

      yeah I am seeing this also, for context in my case I have a file copy that is used to create and artifact that is subsequently used by another earthfile... all of these complete successfully, but the error seems like it shouldn't

      /h/v/w/1/s/python_polylith+pdmbase | [----------] 100% FROM python:3.11-bullseye
      /h/v/w/1/s/feature_managment+default-features | --> FROM +base
      /h/v/w/1/s/feature_managment+default-features | --> COPY ./default_feature_flags.json ./default_feature_flags.json
      /h/v/w/1/s/feature_managment+default-features | WARN /home/vsts/work/1/s/feature_managment/Earthfile:5:4: The command
      /h/v/w/1/s/feature_managment+default-features |           COPY ./default_feature_flags.json ./default_feature_flags.json
      /h/v/w/1/s/feature_managment+default-features | failed: context canceled: context canceled
      /h/v/w/1/s/feature_managment+default-features | WARN /home/vsts/work/1/s/feature_managment/Earthfile:5:4: The command
      /h/v/w/1/s/feature_managment+default-features |           COPY ./default_feature_flags.json ./default_feature_flags.json
      /h/v/w/1/s/feature_managment+default-features | failed: context canceled: context canceled
      /h/v/w/1/s/feature_managment+default-features | WARN /home/vsts/work/1/s/feature_managment/Earthfile:5:4: The command
      /h/v/w/1/s/feature_managment+default-features |           COPY ./default_feature_flags.json ./default_feature_flags.json
      /h/v/w/1/s/feature_managment+default-features | failed: context canceled: context canceled
      /h/v/w/1/s/python_polylith+pdmbase | [          ]   0% FROM python:3.11-bullseye
      /h/v/w/1/s/python_polylith+pdmbase | [----------] 100% FROM python:3.11-bullseye```
      
      b

      brandon356

      8/14/2024

      I am wondering this as well.

      i

      ingwar

      8/14/2024

      Good question.. I wanted to ask myself about those “errors”..

      m

      mortenjo

      8/14/2024

      In some of my builds I occasionally see messages like this:

                   +docker |           COPY +build/mutilator /
                   +docker | failed: context canceled: context canceled
                   +docker | Overriding args used:```
      The message sounds like it would be really bad, but it's only a warning and the build completes successfully ... what is going on here?