Skip to content

Conversation

@roelarents
Copy link
Contributor

In our use case we have many images and we'd like to be able to prioritize better. In order to sort by oldest image, this PR adds a last_updated label (using the Timestamp info on the image).

@davidcollom
Copy link
Contributor

Hi thanks for spending time in raising this PR, we appreciate the time spent, and apologies for the delayed response.

I like the idea, however, If we were to implement this, I'd like to implement this as a new metric, that way the data type can be set accordingly.

Whilst the approach may work, the cardinality of metrics would become quite challenging as each update would be essentially a new unique metrics.

If you'd be up to implementing this as a separate metric, I'd be happy to accept a PR. I will also raise this as an issue so that we can allocate it to a milestone in the future!

@roelarents
Copy link
Contributor Author

Thx for checking!
The date this regards, is the date that the tag was pushed to the repository. Rarely a tag is overwritten (or better: moved to another digest), with the exception of latest. So I would expect this label to be as stable as the version label itself.

Hm, actually other tags change/move more often as well. E.g. major and major.minor version tags. Ok, I understand your point.

@davidcollom
Copy link
Contributor

Hi @roelarents - I believe that #346 should resolve this issue you're looking for and believe is the right dataset of this.

The challenge we have with the "Last Updated" of the image, is that not all providers provide this information efficiently, for example when looking at an OCI Registry, we only ever get a list of strings for tags, and we'd then have to do multiple additional calls to get the manifests, etc... this may be something we look into later, but right now, with docker hub implementing more and more rate limits etc, I'd like to try and keep the API Call's to a minimum where we can/need.

@davidcollom davidcollom closed this Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Expose Metric for last updated/checked timestamp

2 participants