Harden standalone runner server host default#5628
Open
dfgvaetyj3456356-hash wants to merge 2 commits into
Open
Harden standalone runner server host default#5628dfgvaetyj3456356-hash wants to merge 2 commits into
dfgvaetyj3456356-hash wants to merge 2 commits into
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
This changes the deprecated standalone
start-runner-serverCLI host default from the global HTTP server host configuration to the runner implementation's existing localhost fallback. Explicit--hostvalues andBENTOML_HOSTare still preserved.Why
Managed runner servers are already started on
127.0.0.1, but the standalone CLI option could inherit the global HTTP host default. In v2 config that value is0.0.0.0, which is a surprising default for a runner endpoint that is meant to be internal to BentoML serving.Keeping the CLI value unset unless the user explicitly configures it lets
bentoml.start.start_runner_server()continue applying its existing127.0.0.1fallback, while users who intentionally expose the runner server can still pass--host 0.0.0.0.Validation
python -m py_compile src\bentoml_cli\_internal\start.py tests\test_cli_regression.pygit diff --checkpython -m pytest -o addopts= tests\test_cli_regression.py -k "start_runner_server" -q(2 passed)I also ran
python -m pytest -o addopts= tests\test_cli_regression.py -q; the two new tests passed, but the pre-existing timing assertion intest_regressionfailed locally on this machine. That timing test is already xfailed on GitHub Actions.