modern-wolf-36228
11/26/2021, 10:53 AMmodern-wolf-36228
11/26/2021, 10:57 AM./pants filter --target-type=python_distribution :: | xargs ./pants publish
modern-wolf-36228
11/26/2021, 12:54 PMmodern-wolf-36228
11/26/2021, 1:20 PMmodern-wolf-36228
11/26/2021, 2:24 PMrefined-addition-53644
11/26/2021, 4:25 PMpyproject.toml
generated by poetry using BUILD.
I am not able to generate a python distribution for internal-project1
because I think there is no main.py
file and hence it doesn't show in the target list
repo
|
+-- src/
| |
| +-- internal-project1/
| | |
| | +-- pyproject.toml
| | +-- BUILD
| | +-- internal_project1/
| | |
| +-- internal-project2/
| | |
| | +-- pyproject.toml
| | +-- BUILD
| | +-- internal_project2/
| | |
+-- pants
|
+-- pants.toml
|
+-- BUILD
|
+-- requirements.txt
curved-television-6568
11/27/2021, 5:44 PMdocker
backend users,
Iād like to hear your thoughts on this issue: https://github.com/pantsbuild/pants/issues/13718
Thanks ā¤ļøshy-advantage-49800
11/28/2021, 12:44 PMclass CustomSetupKwargsRequest(SetupKwargsRequest):
@classmethod
def is_applicable(cls, _: Target) -> bool:
return True
@rule(level=LogLevel.DEBUG)
async def setup_kwargs_plugin(request: CustomSetupKwargsRequest) -> SetupKwargs:
result = await Get(
ProcessResult,
Process(
argv=["/bin/git", "rev-parse", "--short", "HEAD"],
description="Retrieve last commit hash.",
),
)
I'm not sure if I'm doing it the way it should be, but is this the right way to get the commit hash? I need to add a input_digest
and working_directory
as well, I guess? Am I supposed to create a Snapshot with .git
? š¤modern-wolf-36228
11/29/2021, 4:22 PMdocker login
, but I'm not able to ./pants package ::
(with docker_image
):
failed to dial gRPC: cannot connect to the Docker daemon. Is 'docker daemon' running on this host?: dial unix /var/run/docker.sock: connect: no such file or directory
Ideas? šcurved-television-6568
11/29/2021, 4:27 PMDOCKER_HOST
option, to use another connection option than default?ambitious-petabyte-59095
11/29/2021, 4:55 PM// services/frontend/BUILD
docker_image(name="front", dependencies=[":public", ":package", ":config"])
resources(
name="package",
sources=["services/frontend/package*.json"],
)
resource(
name="config",
source="services/frontend/vue.config.js"
)
resources(
name="public",
sources=["services/frontend/public/*"],
)
// services/frontend/Dockerfile
FROM node:17.1.0 as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY public .
COPY package.json ./
COPY vue.config.js ./
RUN npm run build
// General Project Structure
services
- frontend /
- public/
- data/
- fonts/
- BUILD
- Dockerfile
- package.json
- vue.config.js
src
- js /
- python /
BUILD
pants.toml
requirements.txt
I keep encountering:
#12 [7/8] COPY vue.config.js ./
#12 ERROR: "/vue.config.js" not found: not found
#10 [5/8] COPY public .
#10 ERROR: "/public" not found: not found
#11 [6/8] COPY package.json ./
#11 ERROR: "/package.json" not found: not found
Thanks so muchquiet-evening-25363
11/30/2021, 2:33 AMresource
rule into a test. I'll post the code and test output in the thread, but pkgutil.get_data("util", "test.json")
always returns None
.
A related question...
⢠Is there a better way to debug whether the file is included in the package other than inferring from the output of pants peek
?
Thanks!dazzling-diamond-4749
11/30/2021, 7:00 AM22:57:33.50 [ERROR] 1 Exception encountered:
Exception: Client error (404) downloading file grpc_python_plugin from <https://binaries.pantsbuild.org/bin/grpc_python_plugin/1.32.0/macos/grpc_python_plugin>
I thought this bug was fixed.modern-wolf-36228
11/30/2021, 8:48 AMmodern-wolf-36228
11/30/2021, 8:49 AMenv_vars = ["DOCKER_CONTEXT=pants_context", "DOCKER_HOST"]
I've added this š¤modern-wolf-36228
11/30/2021, 9:16 AMcurved-television-6568
11/30/2021, 9:20 AMDOCKER_*
env vars by default? Or just report that they exist with configuration that we donāt use, unless explicitly added?modern-wolf-36228
11/30/2021, 9:23 AMmodern-wolf-36228
11/30/2021, 9:23 AMrefined-addition-53644
11/30/2021, 9:42 AMversion
of a python package? Like for semantic versioning
./pants version minor <python_package>
clean-night-52582
11/30/2021, 11:50 AMmodern-wolf-36228
11/30/2021, 12:50 PM--no-process-execution-local-cleanup
-> -n
? šhappy-kitchen-89482
11/30/2021, 1:30 PMnarrow-vegetable-37489
11/30/2021, 2:12 PM./pants publish
and DOCKER_HOST
in our CI environment. ./pants package
is connecting to the custom daemon address specified in DOCKER_HOST
just fine, but when running ./pants publish
I get "Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?".stale-nightfall-29801
11/30/2021, 4:22 PMpex_binary
depends on a python_library
and when it's packed up the pex contains mylib/[python_file_i_need.py | __init__.py]
Which seems fine, I've seen it do this in other places in my codebase and work... BUT in the __init__.py
other parts of mylib
are imported so I'm getting: ModuleNotFoundError: No module named ...
errors. Do I need to explicitly depend on the rest of the library (or at least the part pulled into init_.py ?dazzling-diamond-4749
11/30/2021, 4:47 PM2.8.0
dazzling-diamond-4749
11/30/2021, 4:47 PMdazzling-diamond-4749
11/30/2021, 4:48 PMcreamy-airplane-38079
11/30/2021, 5:14 PMhappy-kitchen-89482
11/30/2021, 5:44 PM