microscopic-restaurant-30502
06/25/2024, 2:23 PMError: 5.50 [ERROR] 1 Exception encountered:
Engine traceback:
in `package` goal
ProcessExecutionFailure: Process 'Build python_google_cloud_function artifact for src/misc/funda_cloud_fn:cloud_function' failed with exit code 1.
stdout:
stderr:
A distribution for lxml could not be resolved for cp311-cp311-linux_x86_64.
Found 1 distribution for lxml that do not apply:
1.) The wheel tags for lxml 5.2.2 are cp311-cp311-manylinux_2_28_x86_64 which do not match the supported tags of cp311-cp311-linux_x86_64:
cp311-cp311-manylinux2014_x86_64
... 113 more ...
Not sure how to go about solving this. Installing lxml in the same pipeline selects the correct version:
Run pip install lxml
Collecting lxml
Downloading lxml-5.2.2-cp311-cp311-manylinux_2_28_x86_64.whl.metadata (3.4 kB)
Downloading lxml-5.2.2-cp311-cp311-manylinux_2_28_x86_64.whl (5.0 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.0/5.0 MB 23.6 MB/s eta 0:00:00
Installing collected packages: lxml
Successfully installed lxml-5.2.2
Notice: A new release of pip is available: 24.0 -> 24.1
Notice: To update, run: pip install --upgrade pip
Anyone seen this before?wide-midnight-78598
06/25/2024, 2:59 PMmicroscopic-restaurant-30502
06/25/2024, 3:05 PMmicroscopic-restaurant-30502
06/25/2024, 3:06 PMwide-midnight-78598
06/25/2024, 3:08 PMpants.ci.toml
?
And both your devcontainer and CI have the same glibc version I guess?
I don't really have many ideas here, as I don't use lxml much and haven't run into this. Just trying to check off some sanitieswide-midnight-78598
06/25/2024, 3:08 PMmicroscopic-restaurant-30502
06/25/2024, 3:08 PMmicroscopic-restaurant-30502
06/25/2024, 3:10 PMpants.ci.toml
at the moment, just pants.toml
• Checking version atmmicroscopic-restaurant-30502
06/25/2024, 3:12 PM[GLOBAL]
pants_version = "2.21.0"
backend_packages = [
"pants.backend.docker",
"pants.backend.python",
"pants.backend.experimental.python",
"pants.backend.build_files.fmt.black",
"pants.backend.python.lint.docformatter",
"pants.backend.python.lint.black",
"pants.backend.experimental.python.lint.ruff.check",
"pants.backend.python.lint.isort",
"pants.backend.python.typecheck.mypy",
"pants.backend.google_cloud_function.python"
]
build_ignore = [ ".github/workflows/templates/*/*" ]
[source]
root_patterns = [
"src",
"tests"
]
[python]
interpreter_constraints = ["==3.11.*"]
enable_resolves = true
[python.resolves]
python-default = "3rdparty/python-default.lock"
[python-infer]
use_rust_parser = true
[docker]
env_vars = [
"DOCKER_BUILDKIT=0",
]
build_args = ["VERSION"]
microscopic-restaurant-30502
06/25/2024, 3:14 PMwide-midnight-78598
06/25/2024, 3:15 PMpex
to use, which uses pip 24.1 (pex 2.5.0 or pex 2.6.0) - which I think has improved error messages. Maybe that could enlighten us? https://www.pantsbuild.org/2.23/reference/subsystems/pex-cli
Again, this is a novel error to me as well - so I'm debugging. Maybe someone else has seen this, and knows 🤷microscopic-restaurant-30502
06/25/2024, 3:20 PMmicroscopic-restaurant-30502
06/25/2024, 3:20 PMwide-midnight-78598
06/25/2024, 3:23 PMwide-midnight-78598
06/25/2024, 3:24 PMwide-midnight-78598
06/25/2024, 3:27 PM[pex-cli]
version = "v2.6.0"
known_versions = [
"v2.6.0|macos_arm64|bc8fc449fc8165c395b26b407cc6033cf25cf02a76b7ede54828d2e899c1ee97|4157988",
"v2.6.0|macos_x86_64|71690e672871b55323f5d6ef9a3fe9705f1668662652c4081080e7ab27d44de3|4157988",
"v2.6.0|linux_x86_64|71690e672871b55323f5d6ef9a3fe9705f1668662652c4081080e7ab27d44de3|4157988",
"v2.6.0|linux_arm64|71690e672871b55323f5d6ef9a3fe9705f1668662652c4081080e7ab27d44de3|4157988"
]
wide-midnight-78598
06/25/2024, 3:28 PMmicroscopic-restaurant-30502
06/25/2024, 3:28 PMpants generate-lockfiles --resolve=python-default
15:28:13.39 [INFO] Initializing scheduler...
15:28:16.06 [INFO] Scheduler initialized.
15:28:17.05 [ERROR] 1 Exception encountered:
Engine traceback:
in `generate-lockfiles` goal
IntrinsicError: Wrong digest for downloaded file: want Digest { hash: Fingerprint<71690e672871b55323f5d6ef9a3fe9705f1668662652c4081080e7ab27d44de3>, size_bytes: 4157988 } got Digest { hash: Fingerprint<bc8fc449fc8165c395b26b407cc6033cf25cf02a76b7ede54828d2e899c1ee97>, size_bytes: 4157988 }
microscopic-restaurant-30502
06/25/2024, 3:32 PMwide-midnight-78598
06/25/2024, 3:33 PMwide-midnight-78598
06/25/2024, 3:34 PMmicroscopic-restaurant-30502
06/25/2024, 3:34 PMmicroscopic-restaurant-30502
06/25/2024, 3:35 PMwide-midnight-78598
06/25/2024, 3:35 PMmicroscopic-restaurant-30502
06/25/2024, 3:37 PM15:37:23.43 [INFO] Initializing scheduler...
15:37:25.98 [INFO] Scheduler initialized.
15:37:26.79 [ERROR] 1 Exception encountered:
Engine traceback:
in `generate-lockfiles` goal
IntrinsicError: Wrong digest for downloaded file: want Digest { hash: Fingerprint<71690e672871b55323f5d6ef9a3fe9705f1668662652c4081080e7ab27d44de3>, size_bytes: 4157988 } got Digest { hash: Fingerprint<bc8fc449fc8165c395b26b407cc6033cf25cf02a76b7ede54828d2e899c1ee97>, size_bytes: 4157988 }
microscopic-restaurant-30502
06/25/2024, 3:38 PMmicroscopic-restaurant-30502
06/25/2024, 3:39 PMwide-midnight-78598
06/25/2024, 3:45 PMwide-midnight-78598
06/25/2024, 3:45 PM[pex-cli]
version = "v2.6.0"
known_versions = [
"v2.6.0|macos_arm64|bc8fc449fc8165c395b26b407cc6033cf25cf02a76b7ede54828d2e899c1ee97|4157988",
"v2.6.0|macos_x86_64|bc8fc449fc8165c395b26b407cc6033cf25cf02a76b7ede54828d2e899c1ee97|4157988",
"v2.6.0|linux_x86_64|bc8fc449fc8165c395b26b407cc6033cf25cf02a76b7ede54828d2e899c1ee97|4157988",
"v2.6.0|linux_arm64|bc8fc449fc8165c395b26b407cc6033cf25cf02a76b7ede54828d2e899c1ee97|4157988"
]
microscopic-restaurant-30502
06/25/2024, 6:53 PMwide-midnight-78598
06/25/2024, 6:56 PMwide-midnight-78598
06/25/2024, 6:56 PMmicroscopic-restaurant-30502
06/25/2024, 7:09 PMmicroscopic-restaurant-30502
06/25/2024, 7:31 PMlxml = [
{url = "<https://github.com/lxml/lxml/releases/download/lxml-5.2.2/lxml-5.2.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl>", markers = "sys_platform == 'linux' and platform_machine == 'x86_64'"},
{url = "<https://github.com/lxml/lxml/releases/download/lxml-5.2.2/lxml-5.2.2-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl>", markers = "sys_platform == 'linux' and platform_machine == 'aarch64'"}
]
Not ideal but works.broad-processor-92400
06/25/2024, 7:42 PMmicroscopic-restaurant-30502
06/26/2024, 7:53 AMmicroscopic-restaurant-30502
06/26/2024, 7:54 AMmicroscopic-restaurant-30502
07/01/2024, 1:19 PMdef custom_python_google_cloud_function(**kwargs):
kwargs.setdefault("dependencies", [])#.extend(
# [
# # FIXME <https://github.com/pantsbuild/pants/issues/15454>
# "!!path/to/requirements#mypy",
# "!!path/to/requirements#sqlalchemy-stubs",
# ]
#)
kwargs["complete_platforms"] = ["3rdparty/platforms:google_cloud_function_python_3_11"]
python_google_cloud_function(**kwargs)
'complete platforms' file is generated on GCF using the following code. See [discussion](https://github.com/pantsbuild/pants/discussions/18756).
python
import sh
import functions_framework
@functions_framework.http
def hello_http(request):
print(sh.pex3("interpreter", "inspect", "--markers", "--tags"))
return {'statusCode': 200, 'body': "{}"}