-
Notifications
You must be signed in to change notification settings - Fork 184
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
Garbage collector doesn't clean freight #3572
Comments
@semenar-0, we will attempt to replicate this when we have a chance, but in the meantime, we just want to confirm you understand the eligibility requirements for being garbage collected and that you are certain those requirements are met. The max of 10 you have configured is an ideal max retained beyond the oldest piece of Freight (from each Warehouse) still in use. There are a variety of scenarios where conditions can be blocking Freight from being GC'ed. Two examples:
There are probably a lot more scenarios that could explain this. We are still happy to try and reproduce this when time permits, but as I said... confirming that nothing like the above explains away your issue would be helpful to us. |
@krancour There are 2 warhouses. Most of the freights are not in use. 1045 5` per warehouse:
`kargo get freight --project=workflows -o json | jq -r '.items[] | select(.status.currentlyIn | length == 0) | .origin.name' | sort | uniq -c
|
Thanks @semenar-0! Have you checked that none of the Freight still in use are among some of the oldest? Like I said, very old Freight that's still in use can be blocking a large number of Freight from being GC'ed. Just want to rule this out. |
@krancour Here is the output of the unused Freight. Currently, only five are in use. |
@semenar-0 you haven't answered the question. Have you verified that none of the Freight in use are among the oldest? If that were so, they could be blocking anything newer than themselves from being GC'ed. |
@krancour that what i have checked "select(.status.currentlyIn | length > 0)" based on output only 5 freights of 1029 are in use currently |
@semenar-0 I think you were still not understanding my question. I was asking about the age/timestamps of the Freight that are currently in use. The screen shot, however, tells me what I need to know.
As I've previously explained:
Based on what you've shown me, there is no bug here and GC is working exactly as it is meant to. |
@krancour let's say that from the same warehouse, we continuously promote to QA stage. |
I'm not sure I understand your question. Warehouses find artifacts and "package" them as Freight. They do this continuously and their behavior is unaffected by however the Stages are configured. |
@krancour, in some environments, we don’t have automatic promotion enabled, meaning that an older freight might always remain in use. If I understand correctly, in this scenario, the garbage collector won’t remove newer freights because the older one is still referenced. This is causing a performance issue due to the accumulation of freights. Could you clarify if this is the expected behavior? And if so, what can we do to ensure that newer freights are properly cleaned up while still keeping the necessary ones? |
This is common. What is not common is that the oldest Freight still in use is thousands of generations old.
It is expected.
Zeroing in on the phrase "keeping the necessary ones," Kargo has no way of knowing what unused Freight you consider necessary. GC'ing nothing newer than the oldest Freight still in use is a conservative scheme for not GC'ing something you may actually care about. If this doesn't work for you, you can implement your own GC component. |
Checklist
kargo version
.Description
garbage collector doesn't clean freights. We already have 1029 freights, some of them older than 40 days.
It is breaks the UI.
Screenshots
Steps to Reproduce
Version
Logs
The text was updated successfully, but these errors were encountered: