Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pull_count to artifact #21664

Open
fenuks opened this issue Feb 24, 2025 · 5 comments
Open

Add pull_count to artifact #21664

fenuks opened this issue Feb 24, 2025 · 5 comments
Labels
icebox kind/requirement New feature or idea on top of harbor

Comments

@fenuks
Copy link

fenuks commented Feb 24, 2025

Is your feature request related to a problem? Please describe.
I want to write some script to delete unneeded artifacts/images. Currently
harbor for artifacts only exposes pull_time, and I would like to remove
artifacts that haven't been downloaded in long time and have few downloads.

Describe the solution you'd like
Add pull_count to Artifact. pull_count is already present in Repository, but repository can contain many artifacts.

@chlins chlins added the kind/requirement New feature or idea on top of harbor label Feb 25, 2025
@Vad1mo
Copy link
Member

Vad1mo commented Feb 26, 2025

isn't it on the api level different?

@fenuks
Copy link
Author

fenuks commented Mar 2, 2025

I'm sorry, but I'm not sure what do you mean.

@stonezdj
Copy link
Contributor

stonezdj commented Mar 4, 2025

The pull_count is a cumulative value, can not indicate where this image is used or not now. maybe the pull time is more accurate.

@fenuks
Copy link
Author

fenuks commented Mar 4, 2025

Yes, but I can make stronger assumption that image is unused if it hasn't been pulled in, say, one year with only few pulls, compared to artifact that hasn't been pulled in the same time, but has few hundred pulls. In second case it is much more likely that image is still used somewhere.

@bupd
Copy link
Contributor

bupd commented Mar 4, 2025

isn't it on the api level different?

No, we don't have it on the API level. I think we collect this metric only on repo level and not on the artifact level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
icebox kind/requirement New feature or idea on top of harbor
Projects
None yet
Development

No branches or pull requests

6 participants