You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "Prabin120 (via GitHub)" <gi...@apache.org> on 2023/06/24 16:55:46 UTC
[GitHub] [beam] Prabin120 opened a new pull request, #27236: Beam's Python SDK harness boot entrypoint may fail when python is not…
Prabin120 opened a new pull request, #27236:
URL: https://github.com/apache/beam/pull/27236
… accessible, but python3 is. #26958 fixed
**Please** add a meaningful description for your change here
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [ ] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
- [ ] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/get-started-contributing/#make-the-reviewers-job-easier).
To check the build health, please visit [https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more information about GitHub Actions CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] github-actions[bot] commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1638005703
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment `assign to next reviewer`:
R: @tvalentyn for label python.
Available commands:
- `stop reviewer notifications` - opt out of the automated review tooling
- `remind me after tests pass` - tag the comment author after tests pass
- `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on a diff in pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on code in PR #27236:
URL: https://github.com/apache/beam/pull/27236#discussion_r1248303910
##########
sdks/python/container/piputil.go:
##########
@@ -78,17 +82,17 @@ func pipInstallPackage(files []string, dir, name string, force, optional bool, e
// installed if necessary. This achieves our goal outlined above.
args := []string{"-m", "pip", "install", "--no-cache-dir", "--disable-pip-version-check", "--upgrade", "--force-reinstall", "--no-deps",
filepath.Join(dir, packageSpec)}
- err := execx.Execute("python", args...)
+ err := execx.Execute("python3", args...)
Review Comment:
use the helper here as well and all other applicable places.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on a diff in pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on code in PR #27236:
URL: https://github.com/apache/beam/pull/27236#discussion_r1246732375
##########
sdks/python/container/piputil.go:
##########
@@ -28,7 +28,19 @@ import (
"github.com/apache/beam/sdks/v2/go/pkg/beam/util/execx"
)
-
+// It will return the python interpreter type i.e. python or python3 if available else return empty string.
+func pythonVersion() string {
Review Comment:
Let's not duplicate the implementation. Can we find a home for the helper under https://github.com/apache/beam/tree/master/sdks/go/pkg/beam/util/ ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1610014921
Thanks a lot for your contribution, @Prabin120. We can merge once the testsuite passes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1686840990
closing in favor of https://github.com/apache/beam/pull/28046
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] github-actions[bot] commented on pull request #27236: Beam's Python SDK harness boot entrypoint may fail when python is not…
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1605662071
Assigning reviewers. If you would like to opt out of this review, comment `assign to next reviewer`:
R: @damccorm for label python.
Available commands:
- `stop reviewer notifications` - opt out of the automated review tooling
- `remind me after tests pass` - tag the comment author after tests pass
- `waiting on author` - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)
The PR bot will only process comments in the main thread (not review comments).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] Prabin120 commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "Prabin120 (via GitHub)" <gi...@apache.org>.
Prabin120 commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1613696990
Thank you sir for pointing ou the pre defined function to check python version. I have made changes according to the function. Please verify.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on a diff in pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on code in PR #27236:
URL: https://github.com/apache/beam/pull/27236#discussion_r1248299336
##########
sdks/python/container/boot.go:
##########
@@ -330,7 +334,7 @@ func setupVenv(ctx context.Context, logger *tools.Logger, baseDir, workerId stri
if err := os.MkdirAll(dir, 0750); err != nil {
return "", fmt.Errorf("failed to create Python venv directory: %s", err)
}
- if err := execx.Execute("python", "-m", "venv", "--system-site-packages", dir); err != nil {
+ if err := execx.Execute("python3", "-m", "venv", "--system-site-packages", dir); err != nil {
Review Comment:
need to use helper here as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1610007390
Run Dataflow Python ValidatesContainer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1610007715
Run Python Dataflow ValidatesContainer
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on a diff in pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on code in PR #27236:
URL: https://github.com/apache/beam/pull/27236#discussion_r1246737523
##########
sdks/python/container/piputil.go:
##########
@@ -28,7 +28,19 @@ import (
"github.com/apache/beam/sdks/v2/go/pkg/beam/util/execx"
)
-
+// It will return the python interpreter type i.e. python or python3 if available else return empty string.
+func pythonVersion() string {
Review Comment:
Actually, looks like there is one already: https://github.com/apache/beam/blob/1446295d66d394114d4f3e99980a598b9608881c/sdks/go/pkg/beam/core/runtime/xlangx/expansionx/download.go#L385
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on a diff in pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on code in PR #27236:
URL: https://github.com/apache/beam/pull/27236#discussion_r1248303141
##########
sdks/python/container/boot.go:
##########
@@ -91,11 +92,14 @@ func main() {
"--container_executable=/opt/apache/beam/boot",
}
log.Printf("Starting worker pool %v: python %v", workerPoolId, strings.Join(args, " "))
- if err := execx.Execute("python", args...); err != nil {
- log.Fatalf("Python SDK worker pool exited with error: %v", err)
+ pythonVersion,err := expansionx.getPythonVersion()
+ if err == nil{
Review Comment:
I think a more common pattern is to handle error case, then proceed with normal flow:
```
if pythonVersion, err := expansionx.getPythonVersion(); err != nil {
return err // (or some other message + err)
}
<non-error flow>
```
any concerns with that ? thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] damccorm commented on a diff in pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "damccorm (via GitHub)" <gi...@apache.org>.
damccorm commented on code in PR #27236:
URL: https://github.com/apache/beam/pull/27236#discussion_r1261215076
##########
sdks/python/container/boot.go:
##########
@@ -91,12 +92,11 @@ func main() {
"--container_executable=/opt/apache/beam/boot",
}
log.Printf("Starting worker pool %v: python %v", workerPoolId, strings.Join(args, " "))
- if err := execx.Execute("python", args...); err != nil {
- log.Fatalf("Python SDK worker pool exited with error: %v", err)
+ if pythonVersion, err := expansionx.getPythonVersion(); err != nil {
+ log.Print("Python SDK worker pool exited.")
+ os.Exit(0)
}
- log.Print("Python SDK worker pool exited.")
- os.Exit(0)
- }
+ log.Fatalf("Python SDK worker pool exited with error: %v", err)
Review Comment:
Looks like we're missing a closing curly brace here
##########
sdks/python/container/piputil.go:
##########
@@ -38,21 +38,31 @@ func pipInstallRequirements(files []string, dir, name string) error {
// option will make sure that only things staged in the worker will be
// used without following their dependencies.
args := []string{"-m", "pip", "install", "-r", filepath.Join(dir, name), "--no-cache-dir", "--disable-pip-version-check", "--no-index", "--no-deps", "--find-links", dir}
- if err := execx.Execute("python", args...); err != nil {
+ pythonVersion, err := expansionx.getPythonVersion()
+ if err != nil {
fmt.Println("Some packages could not be installed solely from the requirements cache. Installing packages from PyPI.")
+ return fmt.Errorf("Python interpreter is not available: %v", err)
}
// The second install round opens up the search for packages on PyPI and
// also installs dependencies. The key is that if all the packages have
// been installed in the first round then this command will be a no-op.
args = []string{"-m", "pip", "install", "-r", filepath.Join(dir, name), "--no-cache-dir", "--disable-pip-version-check", "--find-links", dir}
- return execx.Execute("python", args...)
+ if err := execx.Execute(pythonVersion, args...); err != nil {
+ return fmt.Errorf("Could not start the expansion service: %v", err)
+ }
+ return nil
+
}
}
return nil
}
// pipInstallPackage installs the given package, if present.
func pipInstallPackage(files []string, dir, name string, force, optional bool, extras []string) error {
+ pythonVersion, err := expansionx.getPythonVersion()
+ if err != nil {
+ return fmt.Errorf("python interpreter is not available.")
+ }
Review Comment:
I think having a single pythonVersion check at the start of a function is a cleaner way of doing this, could we just do this in the other functions?
##########
sdks/python/container/piputil.go:
##########
@@ -38,21 +38,31 @@ func pipInstallRequirements(files []string, dir, name string) error {
// option will make sure that only things staged in the worker will be
// used without following their dependencies.
args := []string{"-m", "pip", "install", "-r", filepath.Join(dir, name), "--no-cache-dir", "--disable-pip-version-check", "--no-index", "--no-deps", "--find-links", dir}
- if err := execx.Execute("python", args...); err != nil {
+ pythonVersion, err := expansionx.getPythonVersion()
+ if err != nil {
fmt.Println("Some packages could not be installed solely from the requirements cache. Installing packages from PyPI.")
+ return fmt.Errorf("Python interpreter is not available: %v", err)
}
// The second install round opens up the search for packages on PyPI and
// also installs dependencies. The key is that if all the packages have
// been installed in the first round then this command will be a no-op.
args = []string{"-m", "pip", "install", "-r", filepath.Join(dir, name), "--no-cache-dir", "--disable-pip-version-check", "--find-links", dir}
- return execx.Execute("python", args...)
+ if err := execx.Execute(pythonVersion, args...); err != nil {
+ return fmt.Errorf("Could not start the expansion service: %v", err)
+ }
+ return nil
Review Comment:
This can be simplified to `return execx.Execute(pythonVersion, args...)`
##########
sdks/python/container/boot.go:
##########
@@ -91,12 +92,11 @@ func main() {
"--container_executable=/opt/apache/beam/boot",
}
log.Printf("Starting worker pool %v: python %v", workerPoolId, strings.Join(args, " "))
- if err := execx.Execute("python", args...); err != nil {
- log.Fatalf("Python SDK worker pool exited with error: %v", err)
+ if pythonVersion, err := expansionx.getPythonVersion(); err != nil {
+ log.Print("Python SDK worker pool exited.")
+ os.Exit(0)
}
Review Comment:
We should be calling `execx.Execute(pythonVersion, args...)` here, right?
##########
sdks/python/container/piputil.go:
##########
@@ -38,21 +38,31 @@ func pipInstallRequirements(files []string, dir, name string) error {
// option will make sure that only things staged in the worker will be
// used without following their dependencies.
args := []string{"-m", "pip", "install", "-r", filepath.Join(dir, name), "--no-cache-dir", "--disable-pip-version-check", "--no-index", "--no-deps", "--find-links", dir}
- if err := execx.Execute("python", args...); err != nil {
+ pythonVersion, err := expansionx.getPythonVersion()
+ if err != nil {
fmt.Println("Some packages could not be installed solely from the requirements cache. Installing packages from PyPI.")
Review Comment:
This warning should come after calling `execx.Execute(pythonVersion, args...)`, right? I don't think that line should've been totally removed, it should come after this err check
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn closed pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn closed pull request #27236: Switch Python SDK harness entrypoint to use python3
URL: https://github.com/apache/beam/pull/27236
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] Prabin120 commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "Prabin120 (via GitHub)" <gi...@apache.org>.
Prabin120 commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1618240405
All the changes is being made successfully.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1639066444
waiting on author
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] Prabin120 commented on pull request #27236: Beam's Python SDK harness boot entrypoint may fail when python is not…
Posted by "Prabin120 (via GitHub)" <gi...@apache.org>.
Prabin120 commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1605648876
Successfully changes is being made by changing python to python3. Beam's python SDK issue #27236 solved
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] Prabin120 closed pull request #27236: Beam's Python SDK harness boot entrypoint may fail when python is not…
Posted by "Prabin120 (via GitHub)" <gi...@apache.org>.
Prabin120 closed pull request #27236: Beam's Python SDK harness boot entrypoint may fail when python is not…
URL: https://github.com/apache/beam/pull/27236
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1610028619
we would be able to further use the helper function to make the interpreter configurable via an environment variable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1610027575
Actually, after some thinking, I think `python` is a valid command, and is referenced in official documents: https://docs.python.org/3/using/cmdline.html#command-line.
@Prabin120 I would suggest creating a helper function that identifies the python interpreter dynamically and falls back to to `python3` if `python` is not available. We could run that function once per and reuse the return string in other calls.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] codecov[bot] commented on pull request #27236: Beam's Python SDK harness boot entrypoint may fail when python is not…
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1605656707
## [Codecov](https://app.codecov.io/gh/apache/beam/pull/27236?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#27236](https://app.codecov.io/gh/apache/beam/pull/27236?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (7638985) into [master](https://app.codecov.io/gh/apache/beam/commit/e07c461cd45e3942fa48ab4499ec4ee3317dbcff?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (e07c461) will **decrease** coverage by `0.01%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #27236 +/- ##
==========================================
- Coverage 71.64% 71.64% -0.01%
==========================================
Files 855 855
Lines 104419 104419
==========================================
- Hits 74816 74813 -3
- Misses 28056 28059 +3
Partials 1547 1547
```
| Flag | Coverage Δ | |
|---|---|---|
| python | `81.10% <ø> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
[see 4 files with indirect coverage changes](https://app.codecov.io/gh/apache/beam/pull/27236/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] github-actions[bot] commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1630715253
Reminder, please take a look at this pr: @damccorm
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on PR #27236:
URL: https://github.com/apache/beam/pull/27236#issuecomment-1664431128
Hi @Prabin120 , what are next steps on this PR? Do you need any help?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on a diff in pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on code in PR #27236:
URL: https://github.com/apache/beam/pull/27236#discussion_r1248303141
##########
sdks/python/container/boot.go:
##########
@@ -91,11 +92,14 @@ func main() {
"--container_executable=/opt/apache/beam/boot",
}
log.Printf("Starting worker pool %v: python %v", workerPoolId, strings.Join(args, " "))
- if err := execx.Execute("python", args...); err != nil {
- log.Fatalf("Python SDK worker pool exited with error: %v", err)
+ pythonVersion,err := expansionx.getPythonVersion()
+ if err == nil{
Review Comment:
I think a more common pattern is to handle error case, then proceed with normal flow:
```
if pythonVersion, err := expansionx.getPythonVersion(); err != nil {
// handle error or otherwise return err (or some other message + err)
}
<non-error flow>
```
any concerns with that ? thank you!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] tvalentyn commented on a diff in pull request #27236: Switch Python SDK harness entrypoint to use python3
Posted by "tvalentyn (via GitHub)" <gi...@apache.org>.
tvalentyn commented on code in PR #27236:
URL: https://github.com/apache/beam/pull/27236#discussion_r1248298867
##########
sdks/python/container/piputil.go:
##########
@@ -50,8 +38,8 @@ func pipInstallRequirements(files []string, dir, name string) error {
// option will make sure that only things staged in the worker will be
// used without following their dependencies.
args := []string{"-m", "pip", "install", "-r", filepath.Join(dir, name), "--no-cache-dir", "--disable-pip-version-check", "--no-index", "--no-deps", "--find-links", dir}
- pythonVersion := pythonVersion()
- if pythonVersion != "" {
+ pythonVersion,err := expansionx.getPythonVersion()
+ if err == nil {
Review Comment:
we need to fail with a clear error otherwise.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org