registry-image-resource
registry-image-resource copied to clipboard
Using `put` sometimes causes a Concourse job to fail due to the `get` task after pushing an image
I'm seeing an error like this sometimes when a Concourse worker runs a job that uses registry-image as a type.
fetching <repository>@sha256:<XXXXXXXXXXXXXXXXX>
ERRO[0000] fetching origin <image> failed: locate remote image: GET <repository>@sha256:<XXXXXXXXXXXXXXXXX>: NOT_FOUND: artifact <repository>@sha256:<XXXXXXXXXXXXXXXXX> not found
Here is an example of what we are using:
- name: resource-name
type: registry-image
source:
repository: <repository>
- put: resource-name
The image pushing will work successfully, but the secondary task of get when it pulls the image will fail randomly.
Is there a workaround for this?
Is it possible to disable the get that runs after the put task or to demand a sleep delay for the get task?
What type of registry is it pushing it to? Is it eventually consistent or something? Maybe get needs retry logic?
Is it possible to disable the
getthat runs after theputtask or to demand a sleep delay for thegettask?
Not currently possible, but will be possible in the future with resource prototypes (concourse/rfcs#38).
We are hitting this in our pipelines as well (time wasted while getting the image). To work around this, do we explicitly upload the built image in a separate script?
workaround is to set in your put step skip_download flag described here https://concourse-ci.org/put-step.html#schema.put.get_params
This is excellent, but what is the purpose of the implicit image fetch after the put? Seems odd to have this as a default behaviour?