Skip to content
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

pants export with a pantsd that's already run export gives "plugin is calling await Effect(...)" warning, in Pants 2.22 #21624

Open
huonw opened this issue Nov 7, 2024 · 0 comments
Labels
backend: Python Python backend-related issues bug
Milestone

Comments

@huonw
Copy link
Contributor

huonw commented Nov 7, 2024

Describe the bug

If one runs pants export to create a Python venv twice with the same Pantsd process, one gets two identical warnings:

14:35:32.11 [WARN] A plugin is calling `await Effect(InteractiveProcessResult, InteractiveProcess, process)` directly. This will cause restarting logic not to be applied. Use `await run_interactive_process(process)` or `await run_interactive_process_in_environment(process, environment_name)` instead. See https://github.com/pantsbuild/pants/blob/release_2.22.0/src/python/pants/engine/intrinsics.py for more details.

Reproducer:

cd $(mktemp -d)

cat > pants.toml <<EOF
[GLOBAL]
pants_version = "2.22.0"

backend_packages = [
  "pants.backend.python",
]

[python]
interpreter_constraints = ["CPython==3.10.*"]
enable_resolves = true
EOF

pants generate-lockfiles --resolve=python-default

echo "*** First export ***"
# Okay, no warnings
pants export --resolve=python-default

echo "*** Second export ***"
# BUG: two warnings
pants export --resolve=python-default

Trimmed output:

...
*** First export ***
Wrote mutable virtualenv for python-default (using Python 3.10.12) to dist/export/python/virtualenvs/python-default/3.10.12

*** Second export ***
14:43:43.80 [WARN] A plugin is calling `await Effect(InteractiveProcessResult, InteractiveProcess, process)` directly. This will cause restarting logic not to be applied. Use `await run_interactive_process(process)` or `await run_interactive_process_in_environment(process, environment_name)` instead. See https://github.com/pantsbuild/pants/blob/release_2.22.0/src/python/pants/engine/intrinsics.py for more details.
14:43:47.29 [WARN] A plugin is calling `await Effect(InteractiveProcessResult, InteractiveProcess, process)` directly. This will cause restarting logic not to be applied. Use `await run_interactive_process(process)` or `await run_interactive_process_in_environment(process, environment_name)` instead. See https://github.com/pantsbuild/pants/blob/release_2.22.0/src/python/pants/engine/intrinsics.py for more details.
Wrote mutable virtualenv for python-default (using Python 3.10.12) to dist/export/python/virtualenvs/python-default/3.10.12

Pants version
2.22.0

OS
macOS

Additional info
The warning comes from #21319 / #21303.

@huonw huonw added bug backend: Python Python backend-related issues labels Nov 7, 2024
@huonw huonw added this to the 2.22.x milestone Nov 7, 2024
@huonw huonw changed the title pants export with a pantsd that's already run export "plugin is calling await Effect(...)" warning, in Pants 2.22 pants export with a pantsd that's already run export gives "plugin is calling await Effect(...)" warning, in Pants 2.22 Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Python Python backend-related issues bug
Projects
None yet
Development

No branches or pull requests

1 participant