-
Notifications
You must be signed in to change notification settings - Fork 42
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
Added process.Background()
and process.Forwarded()
#804
Conversation
This PR adds higher-level wrappers for calling subprocesses
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.
I like centralizing this, as long as it is flexible enough that we don't have to use a mix of libs/process and os/exec.
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.
The Windows test failures are caused by:
\r\n
line feedSYSTEMROOT
env var being set
Everything else LGTM.
Bundles: * Enable target overrides for pipeline clusters ([#792](#792)). * Add support for regex patterns in template schema ([#768](#768)). * Make the default `databricks bundle init` template more self-explanatory ([#796](#796)). * Make a notebook wrapper for Python wheel tasks optional ([#797](#797)). * Added a warning when Python wheel wrapper needs to be used ([#807](#807)). Internal: * Added `process.Background()` and `process.Forwarded()` ([#804](#804)). Dependency updates: * Bump golang.org/x/term from 0.11.0 to 0.12.0 ([#798](#798)). * Bump github.com/hashicorp/terraform-exec from 0.18.1 to 0.19.0 ([#801](#801)). * Bump golang.org/x/oauth2 from 0.11.0 to 0.12.0 ([#802](#802)).
Bundles: * Enable target overrides for pipeline clusters ([#792](#792)). * Add support for regex patterns in template schema ([#768](#768)). * Make the default `databricks bundle init` template more self-explanatory ([#796](#796)). * Make a notebook wrapper for Python wheel tasks optional ([#797](#797)). * Added a warning when Python wheel wrapper needs to be used ([#807](#807)). Internal: * Added `process.Background()` and `process.Forwarded()` ([#804](#804)). Dependency updates: * Bump golang.org/x/term from 0.11.0 to 0.12.0 ([#798](#798)). * Bump github.com/hashicorp/terraform-exec from 0.18.1 to 0.19.0 ([#801](#801)). * Bump golang.org/x/oauth2 from 0.11.0 to 0.12.0 ([#802](#802)).
This PR adds a few utilities related to Python interpreter detection: - `python.DetectInterpreters` to detect all Python versions available in `$PATH` by executing every matched binary name with `--version` flag. - `python.DetectVirtualEnvPath` to detect if there's any child virtual environment in `src` directory - `python.DetectExecutable` to detect if there's python3 installed either by `which python3` command or by calling `python.DetectInterpreters().AtLeast("v3.8")` To be merged after #804, as one of the steps to get #637 in, as previously discussed.
## Changes This PR adds higher-level wrappers for calling subprocesses. One of the steps to get #637 in, as previously discussed. The reason to add `process.Forwarded()` is to proxy Python's `input()` calls from a child process seamlessly. Another use-case is plugging in `less` as a pager for the list results. ## Tests `make test`
Bundles: * Enable target overrides for pipeline clusters ([#792](#792)). * Add support for regex patterns in template schema ([#768](#768)). * Make the default `databricks bundle init` template more self-explanatory ([#796](#796)). * Make a notebook wrapper for Python wheel tasks optional ([#797](#797)). * Added a warning when Python wheel wrapper needs to be used ([#807](#807)). Internal: * Added `process.Background()` and `process.Forwarded()` ([#804](#804)). Dependency updates: * Bump golang.org/x/term from 0.11.0 to 0.12.0 ([#798](#798)). * Bump github.com/hashicorp/terraform-exec from 0.18.1 to 0.19.0 ([#801](#801)). * Bump golang.org/x/oauth2 from 0.11.0 to 0.12.0 ([#802](#802)).
This PR adds a few utilities related to Python interpreter detection: - `python.DetectInterpreters` to detect all Python versions available in `$PATH` by executing every matched binary name with `--version` flag. - `python.DetectVirtualEnvPath` to detect if there's any child virtual environment in `src` directory - `python.DetectExecutable` to detect if there's python3 installed either by `which python3` command or by calling `python.DetectInterpreters().AtLeast("v3.8")` To be merged after #804, as one of the steps to get #637 in, as previously discussed.
Changes
This PR adds higher-level wrappers for calling subprocesses. One of the steps to get #637 in, as previously discussed.
The reason to add
process.Forwarded()
is to proxy Python'sinput()
calls from a child process seamlessly. Another use-case is plugging inless
as a pager for the list results.Tests
make test