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 method for deduping images #1266

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

IamTheFij
Copy link
Contributor

This is helpful with Nomad because some images end up used as sidecars for many jobs. Also periodic jobs spawn many tasks with the same image.

This is helpful with Nomad because some images end up used as sidecars for many jobs.
Also periodic jobs spawn many tasks with the same image.
@IamTheFij IamTheFij requested a review from crazy-max as a code owner November 20, 2024 00:45
@crazy-max
Copy link
Owner

Thanks but I think this should be something done for all providers related to #342

@IamTheFij
Copy link
Contributor Author

I was reluctant to make changes to other providers I'm less familiar with, but I think this is fairly safe. Thoughts on doing it all in one PR or splitting it?

@IamTheFij
Copy link
Contributor Author

I just added it to all of them now.

@IamTheFij
Copy link
Contributor Author

I was just thinking that this won't dedupe across providers, but that's probably not an issue and also not nearly as easy since it appears that there is no central aggregation of model.Images before checking for updates.

@crazy-max
Copy link
Owner

I was just thinking that this won't dedupe across providers, but that's probably not an issue and also not nearly as easy since it appears that there is no central aggregation of model.Images before checking for updates.

Yes indeed. At first I was just thinking about dedup notifications but it would be better to dedup image analysis across all providers. One way would be to have another job matrix to just collect tags we want to analyze and dedup those before checking for updates. We would need to make sure metadata are handled during dedup so it would analyze an image once but would potentially send multiple notifications if metadata are different. I will think about it a bit more.

@IamTheFij
Copy link
Contributor Author

What do you think about merging this now while determining if a broader refactor is in order? It seems like an improvement over status quo and probably few users use multiple providers.

@IamTheFij
Copy link
Contributor Author

Also, not sure what happened with the test run… I added a test for everything I wrote. I can’t tell if the change actually results in lower coverage or if some flake made the tests abort and resulted in reporting lower coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants