New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static configuration of webserver and dbserver localhost ports, bind only to localhost, fixes #1491, fixes #941, #642 too #1502
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
4a4fe93
go.mod add phayes/freeport to get explicit free tcp port
rfay cc5013b
Add configuration to expliictly bind to a static host db port, fixes …
rfay 02cc79a
Add static binding to webserver localhost port
rfay b224270
Fix panic in test
rfay b650164
Use docker IP instead of 127.0.0.1 in docker-compose.yaml
rfay b277d16
Refactor util.GetFreePort and add TestGetFreePort()
rfay 9bd0ce6
Revert "go.mod add phayes/freeport to get explicit free tcp port"
rfay 5ce7ab0
Fix signature for GetFreePort()
rfay cd5fc83
Add check for docker toolbox port
rfay fb4fd80
Work on test proves that this isn't quite valid
rfay 84d538f
Rework strategy to use map to determine availability
rfay 1521bfd
Add TestPortSpecifications to validate port collision behavior
rfay 33521db
Switch to a project list strategy, much more expandable
rfay 4114e5a
Remove config.yaml between projects in TestConfigInvalidProjectname
rfay a7bc650
Need fullpath in NewApp()
rfay d62115e
Add check that localhost web container bind port is working
rfay aa917f3
Do quick and dirty test of mysql connectivity on localhost port
rfay e143931
Fix minor rebase fail
rfay 96cbae1
Don't always reserve ports, only reserve if in config.yaml
rfay 607adeb
Rework TestPortSpecifications to match updated behavior
rfay fe9e614
More work on TestPortSpecifications
rfay 709c6dc
Make TestCmdGlobalConfig less fragile
rfay 8512473
Add --host-db-port and --host-webserver-port
rfay b66cc08
Use flow only for UsedHostPorts
rfay 82fef8a
Add test coverage for --host-db-port and --host-webserver-port
rfay 6701e16
Omit host ports when empty in global config
rfay File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this call to globalconfig.ReservePorts is moved up inside the if block right before it (
if len(portsToReserve) > 0 {
), the project info map won't be written to the global config file in the case where no ports are requested. There may be some unintended consequences there that I'm not considering, but it does seem a touch cleaner in the general case from what I can tell.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but I want the project info map always, for future use. I'm expecting it to be there for every project by the next sprint, containing a minimum of the approot. Given that I want it in the projectlist, are you good with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, in that case it's totally fine after your most recent commit.