Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix changing host target port #2376
@@ Coverage Diff @@ ## master #2376 +/- ## ========================================== - Coverage 62.08% 61.78% -0.31% ========================================== Files 49 128 +79 Lines 6842 21114 +14272 ========================================== + Hits 4248 13045 +8797 - Misses 2163 6663 +4500 - Partials 431 1406 +975
LGTM, agree that the logic looks a bit fuzzy, still not have super clear what was happening before like the isPortsAllocated was returning true so was not clearing the previous state?
Yeah my understanding is that every case where a port was added or removed caused an allocation. But if a port was added and a port was removed, there was no logic to handle that, because host ports changes are usually handled in a different function. But because this seemed more like the add/remove case than the host port changed case, I went with changing this function. Sorry if that's a little unspecific, I'm on mobile.