You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Say you have some python unit tests that use a docker_environment without a fallback to local (i.e. they require Docker), but you have docker_execution = false by default set in your pants.toml. If you try and run the fmt or lint goals over these targets you will get the following error:
Engine traceback:
in `fmt` goal
NoFallbackEnvironmentError: The global option `--docker-execution` is set to false, but the Docker environment `my_app_test_env` is used in my_app/tests/test_configs.pythe `environment` field of targets including , my_app/tests/test_ops.pythe `environment` field of targets including , my_app/tests/test_resources.py.
Either enable the option `--docker-execution`, or set the field `fallback_environment` for the target my_app/tests:environment.
However, these goals don't require docker and if you set docker_execution = true you will get the following warning:
[WARN] The lint goal was called with targets including `my_app/tests/test_configs.py`, `my_app/tests/test_ops.py`, `my_app/tests/test_resources.py` (and others), which specify the environment `my_app_test_env`, which is a `docker_environment`. The lint goal only runs in the local environment. You may experience unexpected behavior.
These goals should just run even if docker_execution = false.
Pants version
2.18.0
OS
MacOS but I believe it is present on both.
The text was updated successfully, but these errors were encountered:
Describe the bug
Say you have some python unit tests that use a
docker_environment
without a fallback to local (i.e. they require Docker), but you havedocker_execution = false
by default set in yourpants.toml
. If you try and run thefmt
orlint
goals over these targets you will get the following error:However, these goals don't require docker and if you set
docker_execution = true
you will get the following warning:These goals should just run even if
docker_execution = false
.Pants version
2.18.0
OS
MacOS but I believe it is present on both.
The text was updated successfully, but these errors were encountered: