nice-park-16693
03/07/2023, 9:43 AMbusy-vase-39202
03/07/2023, 9:55 AMbusy-vase-39202
03/07/2023, 9:57 AMbusy-vase-39202
03/07/2023, 9:59 AMnice-park-16693
03/07/2023, 10:00 AMadventurous-tiger-49478
03/07/2023, 10:14 AM./pants run fleet_backend:manage -- runserver ─╯
131030.41 [INFO] Completed: Building local_dists.pex
131043.88 [INFO] Completed: Building fleet_backend/manage.pex with 3 requirements: Django==4.1.7, django-stubs>=1.10.0, python-dotenv
Traceback (most recent call last):
File "/home/kalungi/projects/fleet-backend/fleet_backend/manage.py", line 10, in main
from django.core.management import execute_from_command_line
ModuleNotFoundError: No module named 'django'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/home/kalungi/projects/fleet-backend/fleet_backend/manage.py", line 21, in <module>
main()
File "/home/kalungi/projects/fleet-backend/fleet_backend/manage.py", line 12, in main
raise ImportError(
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?brave-hair-402
03/07/2023, 10:35 AMBUILD
files. Is there a way to define this base image in only one place and reuse it across all my BUILD
files? I've considered using environmental variables, but I'm not sure if that's the best approach. Does anyone have any suggestions on how to achieve this?curved-television-6568
03/07/2023, 12:34 PMnice-park-16693
03/07/2023, 1:34 PMbitter-ability-32190
03/07/2023, 2:10 PMbitter-ability-32190
03/07/2023, 3:25 PMpip install
(I blame Python, not people). That being said, it's really frustrating to use non-hermetic Python. That's why I'm divorcing Pants from system Python 🙂
The linked PR makes it so you can opt-into having Pants use pyenv
to build and install Python in a read-only cache directory. So it should become way more hermetic. It'll still rely on system libraries, but nothing is truly hermetic and this is a great improvement.brave-hair-402
03/07/2023, 4:28 PMdocker build -t hello_docker .
. Any ideas why this might be happening?fast-nail-55400
03/07/2023, 6:12 PMdelightful-kite-93928
03/07/2023, 6:13 PMfast-nail-55400
03/07/2023, 6:14 PMancient-vegetable-10556
03/07/2023, 6:44 PMfast-nail-55400
03/07/2023, 6:54 PMProcess
and the newer work superseding immutable inputs to symlink inputs insteadfast-nail-55400
03/07/2023, 6:54 PMancient-vegetable-10556
03/07/2023, 6:59 PMbitter-ability-32190
03/07/2023, 6:59 PMfast-nail-55400
03/07/2023, 7:13 PMWith that in mind: there’s a fairly clear path forward on how to manage the go SDK in a way that is Pants-efficient, which we can probably help someone towards implementing. It’s just not a priority for us to do the heavy lifting ourselvesI have done some initial thinking here. I wanted the Go backend to just have an equivalent to what
pyenv
, coursier
, and asdf
do and download and install the Go SDK into a Pants-managed directory.fast-nail-55400
03/07/2023, 7:13 PMacoustic-garden-40182
03/07/2023, 8:33 PMpants test ::
20:23:27.94 [ERROR] 1 Exception encountered:
Engine traceback:
in `test` goal
in Run Pytest - (environment:local_docker, tests/test_config_test.py)
Exception: Failed to obtain version from local Docker: error trying to connect: Permission denied (os error 13)
I am able to run all docker commands without sudo
pants.toml:
[environments-preview.names]
local_docker = "//:local_docker"
[docker]
env_vars = [
"DOCKER_HOST"
]
BUILD:
__defaults__(all=dict(environment="local_docker"))
docker_environment(
name="local_docker",
platform="linux_x86_64",
image="ubuntu:20.04",
)
Is anyone able to help?purple-plastic-57801
03/07/2023, 9:29 PMsilly-queen-7197
03/07/2023, 9:35 PM_pickle.PicklingError: Can't pickle <class 'pex.enum.Enum'>: it's not the same object as pex.enum.Enum
when running something as a pex? It works fine running as a moduleancient-vegetable-10556
03/07/2023, 10:19 PMcoursier
does inside pants, when it’s used elsewhere?happy-kitchen-89482
03/07/2023, 10:20 PMhappy-kitchen-89482
03/07/2023, 10:20 PMfast-nail-55400
03/07/2023, 10:22 PMcoursier
does in downloading JDKs but managed from within the Pants rules and not via an external utility as coursier
isancient-vegetable-10556
03/07/2023, 10:23 PM