mz305: skip-unused-stages invalidates numeric references#306
Conversation
|
I think the best course of action is to move the This also aligns nicely with my plans to solve #299. As there we need to run This also simplifies the body of the function a bit, as in the process of converting to kaniko-stages, we convert all named references to numeric references, even for |
|
hmmm I think the latter is not true, the references are not replaced with numeric references yet, that follows later. |
c5b3fba to
3935917
Compare
|
I noticed that the pre-build skirmishes are written super confused, we go back and forth talking about stages by name, then by index, creating the same mappings over and over again, skipping stages happens first, then we resolve dependencies again later on etc etc. Code quality wise there is a lot to be gained by just cleaning that mess up. I'm thinking about spending at least one file for all the build graph calculations & optimizations, now the functions are distributed and duplicated all over the place. |
3935917 to
741eb97
Compare
|
The last part of the unittests can be dropped completely. We no longer change the stage indizes, so we also don't need to test that they remain the same. |
After skip & squash the index in the list of stages can change, but references to the stages are not updated. We fix this by storing the original index on the element and only refering to the stage using it's original index. For that end the skipUnusedStages was moved to work on the "intermediate" kanikoStages.
741eb97 to
ed7f31e
Compare
Fixes #305
Description
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide for more details.
Reviewer Notes
Release Notes
Describe any changes here so maintainer can include it in the release notes, or delete this block.