cool-easter-32542
12/27/2023, 3:23 PMdocker_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.
pantsbuild/pants