thousands-plumber-33255
12/08/2022, 8:48 AMpants.toml
/services
  /serviceA
    BUILD
    /tests
      BUILD
      example_test.pypants.toml[environments-preview.names]
linux_docker = "//:local_qgis"docker_environment(
  name="local_qgis",
  image="qgis/qgis:final-3_22_9",
)python_tests(
    environment="local_qgis"
)ResolveError: The address //:local_qgis from the option [environments-preview].names does not exist.
The target name ':local_qgis' is not defined in the directory . Did you mean one of these target names?
  * :rootrefined-addition-53644
12/08/2022, 9:10 AMnamelinux_dockerdocker_environmentthousands-plumber-33255
12/08/2022, 9:47 AMrefined-addition-53644
12/08/2022, 10:29 AMlocal_environmentrefined-addition-53644
12/08/2022, 10:33 AMpython_testlinux_dockerrefined-addition-53644
12/08/2022, 10:40 AMdocker_environmentnamenamethousands-plumber-33255
12/08/2022, 12:10 PMNew virtual environment successfully created at /home/vscode/.cache/pants/setup/bootstrap-Linux-x86_64/2.15.0.dev4_py39thousands-plumber-33255
12/08/2022, 12:32 PMvscode ➜ /nefino_li (feature/2087-add-tests-to-services-qgis-export-feature ✗) $ ./pants --no-pantsd --no-local-cache --print-stacktrace -ldebug --version
Bootstrapping Pants using /usr/bin/python3.9
Creating the virtualenv PEX.
Downloading the Pex PEX.
SHA256 fingerprint of <https://github.com/pantsbuild/pex/releases/download/v2.1.103/pex> verified.
Scrubbing PYTHONPATH
Installing pantsbuild.pants==2.15.0a1 into a virtual environment at /home/vscode/.cache/pants/setup/bootstrap-Linux-x86_64/2.15.0a1_py39
Scrubbing PYTHONPATH
New virtual environment successfully created at /home/vscode/.cache/pants/setup/bootstrap-Linux-x86_64/2.15.0a1_py39.
12:28:36.54 [DEBUG] File handle limit is: 1048576
12:28:36.55 [DEBUG] Using [bounded::CommandRunner { inner: SwitchedCommandRunner { .. }, .. }] for process execution.
12:28:37.18 [DEBUG] Launching 1 roots (poll=false).busy-vase-39202
12/08/2022, 12:42 PMrefined-addition-53644
12/08/2022, 12:56 PMthousands-plumber-33255
12/08/2022, 1:13 PMcurved-television-6568
12/08/2022, 1:24 PMthousands-plumber-33255
12/08/2022, 3:53 PMwitty-crayon-22786
12/08/2022, 5:52 PM.pants.d/pants.logthousands-plumber-33255
12/09/2022, 8:49 AM08:45:23.59 [INFO] handling request:thousands-plumber-33255
12/09/2022, 10:15 AM./pants --print-stacktrace -ldebug test services/qgis/tests/example_test.py
10:02:26.00 [DEBUG] acquiring lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f96edb4a9d0>
10:02:26.00 [DEBUG] terminating pantsd
10:02:26.00 [DEBUG] sending signal 15 to pid 3087
10:02:27.01 [DEBUG] successfully terminated pid 3087
10:02:27.01 [DEBUG] purging metadata directory: .pants/.pids/4b81b7112ed6/pantsd
10:02:27.01 [DEBUG] Launching pantsd
10:02:27.01 [DEBUG] purging metadata directory: .pants/.pids/4b81b7112ed6/pantsd
10:02:27.01 [DEBUG] pantsd command is: PANTS_DAEMON_ENTRYPOINT=pants.pantsd.pants_daemon:launch_new_pantsd_instance PYTHONPATH=/home/vscode/.cache/pants/setup/bootstrap-Linux-x86_64/pants.4UZp49/install/bin:/nefino_li/dist/export/python/virtualenvs/default/3.8.15/lib/python3.8/site-packages:/nefino_li:/usr/lib/python39.zip:/usr/lib/python3.9:/usr/lib/python3.9/lib-dynload:/home/vscode/.cache/pants/setup/bootstrap-Linux-x86_64/2.15.0a1_py39/lib/python3.9/site-packages /home/vscode/.cache/pants/setup/bootstrap-Linux-x86_64/2.15.0a1_py39/bin/python /home/vscode/.cache/pants/setup/bootstrap-Linux-x86_64/2.15.0a1_py39/bin/pants --pants-bin-name=./pants --pants-version=2.15.0a1 --print-stacktrace -ldebug test services/qgis/tests/example_test.py
10:02:28.91 [DEBUG] pantsd is running at pid 3786, pailgun port is 45317
10:02:28.91 [DEBUG] releasing lock: <pants.pantsd.lock.OwnerPrintingInterProcessFileLock object at 0x7f96edb4a9d0>
10:02:28.91 [DEBUG] Connecting to pantsd on port 45317
10:02:28.91 [DEBUG] Connecting to pantsd on port 45317 attempt 1/3
10:02:28.92 [DEBUG] Connected to pantsd
10:02:28.93 [DEBUG] Launching 1 roots (poll=false)../pants --print-stacktrace -ldebug test --no-pantsd services/qgis/tests/example_test.py
10:04:27.84 [DEBUG] File handle limit is: 1048576
10:04:27.85 [DEBUG] Using [cache::CommandRunner { inner: bounded::CommandRunner { inner: SwitchedCommandRunner { .. }, .. }, .. }, cache::CommandRunner { inner: bounded::CommandRunner { inner: SwitchedCommandRunner { .. }, .. }, .. }] for process execution.
10:04:28.37 [DEBUG] Launching 1 roots (poll=false)../pants --versionpython-3.8.15-bullseyewitty-crayon-22786
12/09/2022, 4:20 PM-ltracegdblldbwitty-crayon-22786
12/09/2022, 4:21 PMpantsdthousands-plumber-33255
12/12/2022, 7:47 AM-ltrace2.15.0rc0gdbwitty-crayon-22786
12/12/2022, 5:43 PMgdbthread apply all btwitty-crayon-22786
12/12/2022, 6:49 PM--no-pantsdthousands-plumber-33255
12/13/2022, 11:36 AMwitty-crayon-22786
12/13/2022, 6:33 PMpy-spy dump -p $pidthousands-plumber-33255
12/14/2022, 8:32 AMthousands-plumber-33255
12/19/2022, 1:26 PMbuild_file_prelude_globs = ["pants_plugins/macros.py"]macros.pydef http_service_image(name, service, **kwargs):
    python_awslambda(
        name=f"{service}-lambda",
        runtime="python3.8",
        handler=f"{service}/lambda_handler.py:handler",
        # Otherwise pants cannot safely infer as dir name is the same in all services
        dependencies=[f"//services/{service}/api", f"//services/{service}/lambda_handler.py"]
    )
    docker_image(
        name=name,
        dependencies=[f":{service}-lambda", ":entrypoint"],
        image_tags=["{build_args.IMAGE_TAG}"],
        extra_build_args=[f"SERVICE={service}"],
        repository=f"{{build_args.{service.upper()}_REPO}}",
        **kwargs
    )
def env_vars_django(**kwargs):
    return [
        "ENVIRONMENT",
        "DEBUG",
        "ALLOWED_HOSTS",
        "SECRET_KEY",
        "DJANGO_LOGGING_ENABLED",
        "DJANGO_LOG_LEVEL",
        "DOMAIN",
    ]http_service_image2.14.0thousands-plumber-33255
12/19/2022, 2:42 PMpython_tests14:37:59.83 [ERROR] 1 Exception encountered:
Engine traceback:
  in `test` goal
  in Run Pytest - (environment:linux_docker, services/qgis/tests/example_test.py)
ProcessExecutionFailure: Process 'Extract environment variables from the Docker image python:3.8-bullseye' failed with exit code 126.
stdout:
OCI runtime exec failed: exec failed: unable to start container process: chdir to cwd ("/pants-sandbox/pants-sandbox-kqW2I5") set in config.json failed: no such file or directory: unknown
stderr:thousands-plumber-33255
12/19/2022, 3:03 PM/var/run/docker.sockrefined-addition-53644
12/19/2022, 4:46 PMwitty-crayon-22786
12/19/2022, 6:12 PMthousands-plumber-33255
12/19/2022, 8:16 PMthousands-plumber-33255
12/20/2022, 11:33 AMthousands-plumber-33255
01/03/2023, 7:52 AMwitty-crayon-22786
01/03/2023, 6:14 PMwitty-crayon-22786
01/03/2023, 10:18 PMthousands-plumber-33255
01/04/2023, 8:15 AMthousands-plumber-33255
01/06/2023, 7:07 AMwitty-crayon-22786
01/06/2023, 7:35 PMwitty-crayon-22786
01/06/2023, 8:23 PM