Open onukristo opened 11 months ago
Hello, thank you very much for reporting this! 👍 Agree that the current implementation is naïve, just please refer to getStateforCache method - this is where the state is computed, and there is already some kind of normalization.
So feel free to prepare a PR that would improve this behavior 🙏
Also, please note that there is already removal of the Labels
field, but it is not so important for the container. I would prefer a more sophisticates solution for the Mounts
field, for example just order the array.
I noticed, that composeUp sometimes takes 4-5 seconds, even when the containers are running from previous execution. At other times, it is very fast, less than half a second.
On slow runs, the following is logged: "Current and cached states are different, cannot use the cached service infos.", after which some slow steps, including slow tcp checks, are done.
I realised, that the check here is a bit naive, not considering, that the arrays can have a different order.
For example, first cache state:
and second cache state:
are semantically the same, however have a order difference of "Mounts:ac8a97f7ce79f3…,7111d5ab0ca1f2…,1fd0fecccf9c54…" vs "Mounts:1fd0fecccf9c54…,ac8a97f7ce79f3…,7111d5ab0ca1f2...".
Expected behaviours:
In any case, this is a minor thing. Thanks for the great library.
Appendix #1: fast run logs:
Appendix #2: slow run logs: