-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix impossibility to rebuild child images #671
fix impossibility to rebuild child images #671
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #671 +/- ##
==========================================
- Coverage 58.40% 57.92% -0.49%
==========================================
Files 51 51
Lines 2866 2833 -33
==========================================
- Hits 1674 1641 -33
Misses 1086 1086
Partials 106 106 ☔ View full report in Codecov by Sentry. |
b96099f
to
7ef5705
Compare
The Filter function constructs a completely new graph were unmodified images are discarded. I suppose it was done to have a (very) smaller graph to improve (a little) performance. Unfortunately, we need info on all direct parents images when rebuilding, at least to properly amend the FROM line to be able to pull the right parent image. Thus this refacto broke completely rebuild of every image with at least one not-to-rebuild parent. I fix this quickly by avoiding the Filter function altogether which is too complicated for our sake and does not really improves the performances. Fixes be5509e
e27e513
to
96fca0a
Compare
Following 7ef5705 the "Filter" function is not used anymore. After thinking I think it will not ever be used in this form as it is not generic and thus it is better to completely delete it. Indeed the function is buggy, difficult to understand (and to fix). E.g. I still have not grasped what it try to do with the orphans and their childs. I think (without being sure) the idea behind this was to be able to work on a smaller graph for performance but as the small graph is used just once, the cost of constructing it in the first place completely offsets the potential gains.
96fca0a
to
3e56470
Compare
IMO If we want to keep the creation of the new graph, one possible solution is to add a state to the Node object that holds the tagsToReplace map during the filtering of nodes. This way, we can ensure that the new tags are propagated to the new graph. |
The Filter function (introduced by #336) reconstruct a completely new graph were unmodified images are completely discarded. I suppose it was done to have a (very) smaller graph to improve (a little) performance.
Unfortunately, the information on all direct parents images is needed when rebuilding, at least to properly amend the FROM line to be able to pull the right parent image. Thus this behaviour broke completely the build of every image with at least one not-to-rebuild parent since release v0.19.0
I fix this quickly by avoiding the Filter function altogether.
If the graph reduction were deemed useful it would be needed to discard only nodes which are not modified and which have no modified descendants. But I felt it was too complicated for me. Moreover I think the cost of the reconstruction of the graph offsets all the gains we could expect from having a smaller graph after it.
Fixes be5509e