mysterious-waiter-14207
09/26/2022, 11:59 AMbitter-car-24102
09/26/2022, 12:14 PMInstalling pantsbuild.pants==2.13.0 into a virtual environment at /Users/ian/.cache/pants/setup/bootstrap-Darwin-arm64/2.13.0_py39
++ scrub_env_vars
++ pex_env_vars=(${!PEX_@})
++ local -r pex_env_vars
++ [[ ! 0 -eq 0 ]]
++ '[' -n '' ']'
++ /Users/ian/.pyenv/shims/python3.9 /Users/ian/.cache/pants/setup/bootstrap-Darwin-arm64/virtualenv-20.4.7/virtualenv.pex --quiet --no-download /Users/ian/.cache/pants/setup/bootstrap-Darwin-arm64/pants.QDZmgq/install
++ /Users/ian/.cache/pants/setup/bootstrap-Darwin-arm64/pants.QDZmgq/install/bin/pip install --quiet -U pip 'setuptools<58'
++ /Users/ian/.cache/pants/setup/bootstrap-Darwin-arm64/pants.QDZmgq/install/bin/pip install --quiet --progress-bar off pantsbuild.pants==2.13.0
ERROR: Could not find a version that satisfies the requirement pantsbuild.pants==2.13.0 (from versions: 0.0.17, 0.0.18, 0.0.20, 0.0.21, 0.0.22, 0.0.23, 0.0.24, 0.0.25, 0.0.26, 0.0.27, 0.0.28, 0.0.29, 0.0.30, 0.0.31, 0.0.32, 0.0.33, 0.0.34, 0.0.35, 0.0.36, 0.0.37, 0.0.38, 0.0.39, 0.0.40, 0.0.41, 0.0.42, 0.0.43, 0.0.44, 0.0.45, 0.0.46, 0.0.47, 0.0.48, 0.0.49, 0.0.50, 0.0.51, 0.0.52, 0.0.53, 0.0.54, 0.0.55, 0.0.56, 0.0.57, 0.0.58, 0.0.59, 0.0.60, 0.0.61, 0.0.62, 0.0.63, 0.0.64, 0.0.65, 0.0.66, 0.0.67, 0.0.68, 0.0.69, 0.0.70, 0.0.71, 0.0.72, 0.0.73, 0.0.74, 0.0.75, 0.0.76, 0.0.77, 0.0.79, 0.0.80, 0.0.81, 0.0.82, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.7.0)
ERROR: No matching distribution found for pantsbuild.pants==2.13.0
bitter-car-24102
09/26/2022, 12:15 PMbitter-car-24102
09/26/2022, 12:15 PM% /Users/ian/.cache/pants/setup/bootstrap-Darwin-arm64/pants.QDZmgq/install/bin/pip install <https://files.pythonhosted.org/packages/f9/b1/874493df9662137994a3d1311c2aa8861eee2bc41d4a6ec2a39ea0576954/pantsbuild.pants-2.13.0-cp39-cp39-macosx_11_0_arm64.whl>
ERROR: pantsbuild.pants-2.13.0-cp39-cp39-macosx_11_0_arm64.whl is not a supported wheel on this platform.
bitter-car-24102
09/26/2022, 12:16 PMbitter-car-24102
09/26/2022, 1:29 PMhandsome-sunset-98068
09/26/2022, 1:41 PMname: ci
on:
pull_request:
branches:
- develop
concurrency:
group: ci-${{ github.head_ref }}
cancel-in-progress: true
jobs:
build:
name: Perform CI Checks
env:
PANTS_CONFIG_FILES: pants.ci.toml
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- name: Get the latest code
uses: actions/checkout@v3 # checkout latest commit
- name: Cache the artefacts
uses: actions/cache@v3 # cache the pants, test results, pex binaries
id: cache
with:
path: |
~/.cache/pants/setup
~/.cache/pants/lmdb_store
~/.cache/pants/named_caches
key: ${{ runner.os }}-
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Bootstrap Pants
run: |
./pants --version
- name: Check BUILD files
run: ./pants tailor --check update-build-files --check
- name: Lint and typecheck all targets
run: |
./pants fmt lint ::
- name: Test all targets
run: |
./pants test ::
- name: Upload pants log
uses: actions/upload-artifact@v3
with:
name: pants-log
path: .pants.d/pants.log
if: always() # We want the log even on failures.
polite-garden-50641
09/26/2022, 3:20 PMset -eoxu pipefail
polite-garden-50641
09/26/2022, 3:22 PM~/.cache/pants/setup
will get wiped when you upgrade pants. see: https://github.com/toolchainlabs/remote-api-tools/blob/main/.github/workflows/build.yaml#L24 as an example.worried-painter-31382
09/26/2022, 3:34 PMpantsd
isn't being re-used. We get
17:26:09.72 [INFO] Initializing scheduler...
17:26:09.85 [INFO] Scheduler initialized.
repeatedly for subprocesses.
2. It looks like python2.7 is used for some pex unzip thingy? Is this expected?
3. We're having cache misses everytime the subprocess is rerun. Could it be due to pyenv, XDG_CACHE_HOME_DIR or something else? It's hard to figure out what settings causes pants to disregard its cache.busy-vase-39202
09/26/2022, 4:25 PM-ldebug
.handsome-sunset-98068
09/26/2022, 4:52 PMbrainy-solstice-27042
09/26/2022, 7:18 PMModuleNotFoundError: No module named 'main'
. So far I've tried setting the entry_point='main.py'
, entry_point='main.py:main'
, and even added an __init__.py
at the base of the folder my service is in. Does the entry point path have to equal the path that pants generates the pex as? Or can it just be main.py?broad-processor-92400
09/26/2022, 8:06 PMambitious-actor-36781
09/26/2022, 8:46 PMplain-carpet-73994
09/26/2022, 11:01 PM--extra-index-url
. For example, to run on a CPU you'd do pip3 install torch --extra-index-url <https://download.pytorch.org/whl/cpu>
but for a GPU you'd do pip3 install torch --extra-index-url <https://download.pytorch.org/whl/cu116>
.
I know how to add an extra index URL to [python-repos]
in pants.toml
but I have no idea how to do that conditionally. Any ideas?handsome-sunset-98068
09/27/2022, 8:15 AMResponse
{
"errorMessage": "[Errno 2] No such file or directory: 'newcamera.png'",
"errorType": "FileNotFoundError",
"requestId": "2276ab1d-46e1-4c5f-ad34-18a5f75e3968",
"stackTrace": [
" File \"/var/task/lambdex_handler.py\", line 58, in handler\n return __RUNNER(*args, **kwargs)\n",
" File \"/var/task/test.py\", line 9, in lambda_handler\n file_length()\n",
" File \"/var/task/test.py\", line 2, in file_length\n with open('newcamera.png', 'rb') as f:\n"
]
}
repo link for reference.cold-vr-15232
09/27/2022, 10:17 AMcold-vr-15232
09/27/2022, 1:29 PMcold-vr-15232
09/27/2022, 2:24 PMancient-france-42909
09/27/2022, 3:08 PMwooden-thailand-8386
09/27/2022, 3:08 PMpython310
and we noticed that there’s a list of available targets that are being defined on pants
. By checking out the code we found this ( https://github.com/pantsbuild/pants/blob/2fbd8bb618cbc06bb242e461be9e9942e7699e65/[…]thon/pants/backend/google_cloud_function/python/target_types.py ) would the change be as easy as adding the new runtime there? Also, this is more out of curiosity, but how does pants
handles runtimes that are a different version than the python defined on pants.toml
? Tks!little-zoo-57121
09/27/2022, 3:36 PMpants filter
may be broken? When using filter values that worked in 2.12 or trying anything different we just get the following cryptic error. The only value that does not result in this is --help
busy-vase-39202
09/27/2022, 4:36 PMrefined-addition-53644
09/27/2022, 5:37 PMboundless-zebra-79556
09/27/2022, 8:35 PMmypy
check with pants. On my console it works fine. But on GitHub Action, I get this weird error message:
Error: 9.77 [ERROR] Completed: Typecheck using MyPy - mypy failed (exit code 2).
.cache/pex_root/venvs/2dc0bc0943d3614000af98704b489da83561978d/f8dfd366c5bae0ea109e2675cda4aa418ef670f0/lib/python3.10/site-packages/numpy/__init__.pyi:636: error: Positional-only parameters are only supported in Python 3.8 and greater
It's weird because I'm using Python 3.10, and pants should be able to infer the version, right? Also weird that its checking a third-party package. I'm using pants 2.13.0 and mypy.ini settings are:
[mypy]
namespace_packages = true
explicit_package_bases = true
ignore_missing_imports = true
high-yak-85899
09/27/2022, 8:46 PMgenerate-lockfiles
? For an example, generate-lockfiles
found psycard==2.0.4 for me, but export
was unhappy because that release doesn't have a supported linux option. While I can fix this manually in requirements.txt
, I'm wondering if there's a more robust way to feed architecture constraints in ahead of time.plain-carpet-73994
09/27/2022, 11:47 PMThere was 1 error downloading required artifacts:
1. torch 1.12.1+cu116 from <https://download.pytorch.org/whl/cu116/torch-1.12.1%2Bcu116-cp310-cp310-linux_x86_64.whl>
Executing /home/companion/.cache/pants/named_caches/pex_root/venvs/ed3764586d1d1a9f27f2d6aa23d6ce7741735e1a/35dbbcf0d165ce1faf5f10df88cd6c8a72fc9216/bin/python -sE /home/companion/.cache/pants/named_caches/pex_root/venvs/ed3764586d1d1a9f27f2d6aa23d6ce7741735e1a/35dbbcf0d165ce1faf5f10df88cd6c8a72fc9216/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --use-deprecated legacy-resolver --isolated -q --cache-dir /home/companion/.cache/pants/named_caches/pex_root/pip_cache --log /tmp/pants-sandbox-TxaSjj/.tmp/pex-pip-log.tsa4zqe_/pip.log download --dest /home/companion/.cache/pants/named_caches/pex_root/downloads/b6bc31244aa2818929fbb30c483c221df471e9d856e805c5a1ff72b131ae9e7b.9bdef5f1ebe741c6adc310711d52f843 --no-deps <https://download.pytorch.org/whl/cu116/torch-1.12.1%2Bcu116-cp310-cp310-linux_x86_64.whl> --index-url <https://pypi.org/simple> --extra-index-url <https://download.pytorch.org/whl/cu116> --retries 5 --timeout 15 failed with -9
I think it's just timing out as the download is big. Is there a way to change the --timeout
? Looked through ./pants help-advanced python
and didn't see any options that seemed relevant.high-yak-85899
09/28/2022, 3:09 AMrtl_tools@ <git+ssh://git@git.corp.astranis.com/source/rtl_tools.git@1508cf5ef4f0e645e65bfe1af5343fe1b35f0422>
in my requirements file. I'm seeing "url": "git+ssh://****@git.corp.astranis.com/source/rtl_tools.git@1508cf5ef4f0e645e65bfe1af5343fe1b35f0422"
end up in the constraints file. What's going on with the ****
?ancient-breakfast-45303
09/28/2022, 3:26 AM