Don't restart the ddev-router all the time, fixes #1236 #1280
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Problem/Issue/Bug:
OP #1236 - We stop the router and check for potential port conflicts with every single ddev start, and it takes a few seconds in the start. It's unnecessary.
How this PR Solves The Problem:
docker-compose up
do the job of deciding whether to recreate ddev-router.Manual Testing Instructions:
Use a few projects with different ports.
Use
ddev start
on them and monitor ddev-router behavior.You can force the occupy-port test with the nc tool, like
nc -l 8080
to force occupation of port 8080 to see if the port check does the right thing on ddev start.Automated Testing Overview:
TestGetExposedContainerPorts() was added for the new GetExposedContainerPorts() utility.
Our existing tests should do the job of testing port overrides and such, as the behavior mostly stays on parallel.
Related Issue Link(s):
OP #1236