2 ms·
> https://cloud.google.com/storage/docs/lifecycle#numberofnewe https://cloud.google.com/storage/docs/lifecycle#numberofnewe... That is object specific though,
by valenterry 4y ago
> https://cloud.google.com/storage/docs/lifecycle#numberofnewe https://cloud.google.com/storage/docs/lifecycle#numberofnewe...
That is object specific though, so probably won't work unless I use exactly one image.
>
derefr 3 hours ago | parent | context | flag | on: Tell HN: Google Cloud suspended our production pro...
> But even if: I would like to e.g. keep the latest 100 images always. I doubt this would be possible with a simply GCS polcy without writing custom code or something like a cron job.
https://cloud.google.com/storage/docs/lifecycle#numberofnewe https://cloud.google.com/storage/docs/lifecycle#numberofnewe...
> > GCR is deprecated and I'm using Artifact Registry. (sorry for the confusion)
>
> You're right that this functionality seems to not be built into the Artifact Registry backend (and that's weird†), but it does still exist: see https://github.com/GoogleCloudPlatform/gcr-cleaner https://github.com/GoogleCloudPlatform/gcr-cleaner (found linked from https://cloud.google.com/artifact-registry/docs/docker/manag https://cloud.google.com/artifact-registry/docs/docker/manag...), and specifically the `keep` flag for it.
No, it does not "exist". It's either builtin and then it exists, or it doesn't. What you linked is a way for me to build it myself. And I found this AND this solution is even linked in the years old Google ticket. And guess what, they didn't build it. On AWS no problem. As I said: years behind.
Sure, I can setup my own cron job (or here cloud run function / github action). But that's not what I expect from a leading cloud vendor. This is not a niche feature!
Please don't defend it, Google doesn't deserve it. Credits to whoever build the 3rd party solution, but Google really failed here.
> Depending on how you design the client, it can also "mandate manual usage" — i.e. ensure that the developer is interactively running the process for the process to proceed
Just no.
Let's face it: Google is just too incompetent to do it. Not the developers there, but the company as a whole in the way it is organized. Even IF it were as you said and it would be a philosophy, they could say that close the ticket, but it's still open.
I can list you dozens of similar things with GCP and related Google services.