Git Product home page Git Product logo

Comments (5)

phantomwhale avatar phantomwhale commented on June 15, 2024

Have a theory that it was my accidental commit to master (not a branch / merged PR) that caused the bug to occur...

from aws-ecr-gc.

pda avatar pda commented on June 15, 2024

I don't think that should matter… the aws-ecr-gc invocation isn't parameterized with anything relating to commit/branch.

from aws-ecr-gc.

phantomwhale avatar phantomwhale commented on June 15, 2024

Makes sense...

But mind you, every commit on a branch was working, and my merged PR to master just worked. So not quite sure what it was, but for now the builds seem to be fixed up again.

Will have a better look tomorrow (and try and recreate properly, if I can). Error seemed to arise from the missing tag at the end of the line - e.g 2017-05-22 05:54:32: sha256:2e1595173... [] instead of 2017-05-22 05:54:32: sha256:2e1595173... [build-abcd1234]

from aws-ecr-gc.

pda avatar pda commented on June 15, 2024

This is the source of the last non-error output line and the crashing call: https://github.com/99designs/aws-ecr-gc/blob/master/main.go#L63-L64 … they're both referring to the same deletionList and the printImages() call shows it's valid.

Here's the line the stack trace says is crashing: https://github.com/99designs/aws-ecr-gc/blob/master/registry/ecr.go#L76
I can't spot a problem between the start of the function and that line.

I'm pretty sure it should handle images without tags. The BatchDeleteImage function uses img.Digest which is the sha256:… value.

Not sure what's happening.

from aws-ecr-gc.

phantomwhale avatar phantomwhale commented on June 15, 2024

Got as far as the [] part meaning an "untagged image" - so have removed --delete-untagged from our build pipeline, and this seems to be running stable right now.

The weird thing is ever failure to delete an untagged image seems to coincide with that image simply not being there; I wonder if this is a race condition with the script listing an image it wants to delete (which is already in the process of removal, hence no tag) and then the attempt to actually delete failing?

In any case, I've not seen any random, untagged images getting left behind. Have set myself a note to check in a couple of weeks to see if any cruft is building up, otherwise this seems to be doing the job for us right now.

from aws-ecr-gc.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.