many-iron-92447
03/29/2024, 6:47 PMERROR: Could not find a version that satisfies the requirement endpoint-authenticator==1.1.5 (from versions: none)
ERROR: No matching distribution found for endpoint-authenticator==1.1.5
When running in debug mode I can see :
[DEBUG] Completed: Find interpreter for constraints: CPython>=3.11
and
[DEBUG] Running Building requirements.pex with 10 requirements: aws-lambda-powertools==1.31.1, boto3==1.26.62, endpoint-authenticator==1.1.5, nanoid==2.0.0, psycopg2-binary==2.9.5, pytest-mock==3.10.0, pytest==7.2.1, requests-mock==1.10.0, requests==2.28.2, sqlalchemy==1.4.46 under semaphore with concurrency id: 2, and concurrency: 10
which leads me to believe that it can see endpoint-authenticator
and has the correct interpreter.
Disclaimer: I am a python and pants newb 🙂 Would appreciate any help y'all can provide!many-iron-92447
03/29/2024, 6:48 PM[GLOBAL]
pants_version = "2.17.1"
backend_packages = [
"pants.backend.python",
"pants.backend.awslambda.python",
]
[source]
# The Python source root is the repo root. See <https://www.pantsbuild.org/docs/source-roots>.
root_patterns = ["/"]
[python-bootstrap]
search_path = [
# This will use all interpreters in `$(pyenv root)/versions`.
"<PYENV>",
# Location on the Codefresh docker build.
"/usr/local/bin/",
# Location for WSL
"/usr/bin/",
]
[test]
use_coverage = true
[pytest]
version = "pytest>=7.0.1"
extra_requirements.add = [
"pytest-env>=0.6.2",
]
lockfile = "pantsPytest.lock"
[coverage-py]
fail_under = 80
[anonymous-telemetry]
enabled = false
[python]
interpreter_constraints = [">=3.11"]
[python-repos]
indexes.add = ["http://%(env.JFROG_USERNAME)s:%(env.JFROG_ACCESS_TOKEN)s@endpoint.jfrog.io/artifactory/api/pypi/pypi/simple/index"]
many-iron-92447
03/29/2024, 6:59 PMfrom endpoint.authenticator.auth_service import AuthService
ModuleNotFoundError: No module named 'endpoint'
Which (I believe) I resolved by adding this to my BUILD
file
python_requirement(
name="endpoint-authenticator",
requirements=["endpoint-authenticator==1.1.5"],
modules=["endpoint.authenticator"],
)
many-iron-92447
03/29/2024, 7:02 PMpoetry.lock
and pyproject.toml
respectively as
[[package]]
name = "endpoint-authenticator"
version = "1.1.5"
description = "Authenticator in Python"
optional = false
python-versions = ">=3.11"
files = [
{file = "endpoint.authenticator-1.1.5-py3-none-any.whl", hash = "sha256:cb43f03b69b9f2b8896996e5a0a2e2c6665400f068e27e3516a8fd68fd0f3564"},
{file = "endpoint.authenticator-1.1.5.tar.gz", hash = "sha256:54cb01834f4490649a901360fe93707438345e4fc37d1bda0f320cf7a7f148f4"},
]
[tool.poetry.dependencies]
python = "^3.11"
endpoint-authenticator = {version = ">=1.1.4", source = "endpoint_jfrog"}
happy-kitchen-89482
03/30/2024, 5:19 AMinterpreter_constraints = [">=3.11"]
happy-kitchen-89482
03/30/2024, 5:19 AMhappy-kitchen-89482
03/30/2024, 5:21 AMendpoint-authenticator==1.1.5
may not support those, so the resolve correctly but confusingly fails.happy-kitchen-89482
03/30/2024, 5:21 AMinterpreter_constraints = ["==3.11.*"]
happy-kitchen-89482
03/30/2024, 5:22 AMhappy-kitchen-89482
03/30/2024, 5:22 AMmany-iron-92447
04/01/2024, 3:30 PMmany-iron-92447
04/01/2024, 3:45 PMpants test tests/unit/lambdas/get_configuration/handler_test.py --keep-sandboxes=on_failure -ldebug
10:40:45.73 [INFO] Canceled: Building pytest.pex from pantsPytest.lock
10:40:49.30 [INFO] Completed: Building pytest.pex from pantsPytest.lock
10:40:49.84 [INFO] Preserving local process execution dir /private/var/folders/fz/m_mxnw2s4g51nr6402plb7mh0000gn/T/pants-sandbox-cAGFWb for Building requirements.pex with 10 requirements: aws-lambda-powertools==1.31.1; python_version >= "3.11" and python_version < "4.0", boto3==1.26.62; python_version >= "3.11" and python_version < "4.0", endpoint-authenticator==1.1.5; python_version >= "3.11" and python_version < "4.0", nanoid==2.0.0; python_version >= "3.11" and python_version < "4.0", psycopg2-binary==2.9.5; python_version >= "3.11" and python_version < "4.0", pytest-mock==3.10.0; python_version >= "3.11" and python_version < "4.0", pytest==7.2.1; python_version >= "3.11" and python_version < "4.0", requests-mock==1.10.0; python_version >= "3.11" and python_version < "4.0", requests==2.28.2; python_version >= "3.11" and python_version < "4", sqlalchemy==1.4.46; python_version >= "3.11" and python_version < "4.0"
10:40:49.85 [INFO] Completed: Building requirements.pex with 10 requirements: aws-lambda-powertools==1.31.1; python_version >= "3.11" and python_version < "4.0", boto3==1.26.62; python_version >= "3.11" and python_version < "4.0",... (588 characters truncated)
10:40:49.85 [ERROR] 1 Exception encountered:
Engine traceback:
in `test` goal
ProcessExecutionFailure: Process 'Building requirements.pex with 10 requirements: aws-lambda-powertools==1.31.1; python_version >= "3.11" and python_version < "4.0", boto3==1.26.62; python_version >= "3.11" and python_version < "4.0", endpoint-authenticator==1.1.5; python_version >= "3.11" and python_version < "4.0", nanoid==2.0.0; python_version >= "3.11" and python_version < "4.0", psycopg2-binary==2.9.5; python_version >= "3.11" and python_version < "4.0", pytest-mock==3.10.0; python_version >= "3.11" and python_version < "4.0", pytest==7.2.1; python_version >= "3.11" and python_version < "4.0", requests-mock==1.10.0; python_version >= "3.11" and python_version < "4.0", requests==2.28.2; python_version >= "3.11" and python_version < "4", sqlalchemy==1.4.46; python_version >= "3.11" and python_version < "4.0"' failed with exit code 1.
stdout:
stderr:
pid 15660 -> /Users/rachelellis/.cache/pants/named_caches/pex_root/venvs/839dd85d778df5927a872ace6e92e15b4f301d3d/33f19e3f6ac3abf06260be6310c973dd7cea4c4c/bin/python -sE /Users/rachelellis/.cache/pants/named_caches/pex_root/venvs/839dd85d778df5927a872ace6e92e15b4f301d3d/33f19e3f6ac3abf06260be6310c973dd7cea4c4c/pex --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --isolated -q --cache-dir /Users/rachelellis/.cache/pants/named_caches/pex_root/pip_cache --log /private/var/folders/fz/m_mxnw2s4g51nr6402plb7mh0000gn/T/pants-sandbox-cAGFWb/.tmp/pex-pip-log.1vjw002o/pip.log download --dest /Users/rachelellis/.cache/pants/named_caches/pex_root/downloads/resolver_download.m4wxcf40/Users.rachelellis..pyenv.versions.3.11.8.bin.python3.11 aws-lambda-powertools==1.31.1; python_version >= "3.11" and python_version < "4.0" boto3==1.26.62; python_version >= "3.11" and python_version < "4.0" endpoint-authenticator==1.1.5; python_version >= "3.11" and python_version < "4.0" nanoid==2.0.0; python_version >= "3.11" and python_version < "4.0" psycopg2-binary==2.9.5; python_version >= "3.11" and python_version < "4.0" pytest-mock==3.10.0; python_version >= "3.11" and python_version < "4.0" pytest==7.2.1; python_version >= "3.11" and python_version < "4.0" requests-mock==1.10.0; python_version >= "3.11" and python_version < "4.0" requests==2.28.2; python_version >= "3.11" and python_version < "4" sqlalchemy==1.4.46; python_version >= "3.11" and python_version < "4.0" --index-url <https://pypi.org/simple/> --extra-index-url <http://rellis@endpoint.com>@endpoint.jfrog.io/artifactory/api/pypi/pypi/simple/index --trusted-host rellis@endpoint.com:@endpoint.jfrog.io --retries 5 --timeout 15 exited with 1 and STDERR:
ERROR: Could not find a version that satisfies the requirement endpoint-authenticator==1.1.5 (from versions: none)
ERROR: No matching distribution found for endpoint-authenticator==1.1.5
many-iron-92447
04/01/2024, 4:27 PMcareful-address-89803
04/01/2024, 5:03 PM==3.11.*
?
You can also set --keep-sandboxes=on_failure
to keep the execution environment around. You can then see exactly what command it's running and try removing pieces from itcareful-address-89803
04/01/2024, 5:19 PM--log ...
argument removedmany-iron-92447
04/01/2024, 6:19 PM[python-repos]
indexes = ["http://%(env.JFROG_USERNAME)s:%(env.JFROG_ACCESS_TOKEN)s@endpoint.jfrog.io/artifactory/api/pypi/pypi/simple/index"]
and updating the interpreter_contraints
to ["==3.11.*"]
seems to have worked and I'm no longer seeing the error for endpoint-authenticator
, but I'm now getting the same error for a different package, aws-lambda-powertools
I thought maybe the installed version of that package doesn't work with the updated python, so I updated the aws-lambda-powertools
to the latest version, which didn't solve the issue.careful-address-89803
04/01/2024, 7:01 PM--index-url
set to the jfrog url, does that work?happy-kitchen-89482
04/01/2024, 7:38 PMmany-iron-92447
04/01/2024, 8:09 PMcareful-address-89803
04/01/2024, 8:35 PMmany-iron-92447
04/01/2024, 9:33 PMpants generate-lockfiles --resolve=pytest
I'm getting this error:
ERROR: Could not find a version that satisfies the requirement pytest>=7.0.1 (from versions: none)
ERROR: No matching distribution found for pytest>=7.0.1
careful-address-89803
04/01/2024, 11:59 PMmany-iron-92447
04/02/2024, 12:07 AMmany-iron-92447
04/02/2024, 12:12 AMhappy-kitchen-89482
04/02/2024, 1:24 AM