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.
This PR is doing a few things related to improving the port checks (
portAvailable
andgetPort
):getPort
checks that the container status isrunning
and returns an error otherwiseportAvailable
is only called when installing a new cluster (no existing cluster)portAvailable
a nicer error message by looking for "address in use" error codes.portAvailable
doesn't try to guess whether an existing port is used by Airbyte or not (since it's now only called when no cluster exists)Some code-level changes:
dockertest
docker.Port()
intogetPort()
- it was only being called fromgetPort
and with it merged, I can easily do thestatus == running
check, and the tests seem improved as well.getPort()
now takes a cluster name, instead of the wholek8s.Provider
I made these changes to address to scenarios:
These changes improved the experience in these cases:
Unrelated container bound to port 8000
Before:
After:
Cluster in stopped container
Before:
After: