silly-queen-7197
03/21/2023, 5:43 PM./pants package ::
take a lot longer than it used to do in CI. We have a case where it took 14 hours and crashed with
35d72d/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 223, in _main
status = self.run(options, args)
File "/root/.cache/pants/named_caches/pex_root/venvs/18c001f81959497d649cc48967f7f8493f48767e/cba9b10390762edd539c75c9f4b40c5643
35d72d/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
return func(self, options, args)
File "/root/.cache/pants/named_caches/pex_root/venvs/18c001f81959497d649cc48967f7f8493f48767e/cba9b10390762edd539c75c9f4b40c5643
35d72d/lib/python3.10/site-packages/pip/_internal/commands/download.py", line 130, in run
requirement_set = resolver.resolve(
File "/root/.cache/pants/named_caches/pex_root/venvs/18c001f81959497d649cc48967f7f8493f48767e/cba9b10390762edd539c75c9f4b40c5643
35d72d/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 121, in resolve
self._result = resolver.resolve(
File "/root/.cache/pants/named_caches/pex_root/venvs/18c001f81959497d649cc48967f7f8493f48767e/cba9b10390762edd539c75c9f4b40c5643
35d72d/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 453, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/root/.cache/pants/named_caches/pex_root/venvs/18c001f81959497d649cc48967f7f8493f48767e/cba9b10390762edd539c75c9f4b40c5643
35d72d/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 364, in resolve
raise ResolutionTooDeep(max_rounds)
pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 2000000
silly-queen-7197
03/21/2023, 5:49 PMsilly-queen-7197
03/21/2023, 5:50 PMprotobuf>=3.19.5
but Apache Beam wants protobuf<3.19.5
witty-crayon-22786
03/21/2023, 5:56 PMsilly-queen-7197
03/21/2023, 5:59 PMsilly-queen-7197
03/21/2023, 6:00 PM./pants export ::
would work again. We didn't realize we broke it initially when we added apache-beamsilly-queen-7197
03/21/2023, 6:01 PMyjabri@remote-yjabri-default:~/archipelago$ ./pants dependencies --transitive archipelago/:cli
//:reqs#SQLAlchemy
//:reqs#db-dtypes
//:reqs#duckdb
//:reqs#duckdb-engine
//:reqs#google-api-core
//:reqs#google-cloud-bigquery
//:reqs#google-cloud-pubsub
//:reqs#google-cloud-secret-manager
//:reqs#requests
//:reqs#sqlalchemy-bigquery
//:reqs#typer
//:reqs-dev#setuptools
//:reqs-dev#types-requests
witty-crayon-22786
03/21/2023, 6:01 PMWe are not currently using a lockfilei would definitely recommend using a lockfile. that would mean that you only pay the cost of resolving once when you build the lockfile, rather than every time you package
happy-kitchen-89482
03/21/2023, 6:02 PMsilly-queen-7197
03/21/2023, 6:02 PMsilly-queen-7197
03/21/2023, 6:09 PM-ldebug
like ./pants package -ldebug archipelago/:cli
doesn't provide too much more informationsilly-queen-7197
03/21/2023, 6:12 PMgoogle-api-core~=2.11.0
google-cloud-bigquery-storage~=2.16.2
google-cloud-bigquery~=3.3.5
google-cloud-pubsub~=2.13.10
google-cloud-secret-manager~=2.12.6
google-cloud-storage~=2.5.0
google-cloud-dataflow-client~=0.8.2
it packages in about 40 secondshappy-kitchen-89482
03/21/2023, 6:14 PMsilly-queen-7197
03/21/2023, 6:14 PM./dist/export/.../bin/pip freeze | grep google-
happy-kitchen-89482
03/21/2023, 6:15 PMsilly-queen-7197
03/21/2023, 6:19 PM==
instead of ~=
it works toosilly-queen-7197
03/21/2023, 6:20 PMsilly-queen-7197
03/21/2023, 6:52 PMsilly-queen-7197
03/21/2023, 10:59 PMhappy-kitchen-89482
03/22/2023, 1:49 PMpip._vendor.resolvelib.resolvers.ResolutionTooDeep
says that pip itself is failing on this resolvehappy-kitchen-89482
03/22/2023, 1:51 PMhappy-kitchen-89482
03/22/2023, 1:51 PMhappy-kitchen-89482
03/22/2023, 1:51 PMhappy-kitchen-89482
03/22/2023, 1:52 PMsilly-queen-7197
03/28/2023, 1:36 AM==
in the requirements.txt file instead of ~=
for the packages listed above.
If I have to throw a wild guess out, (this is a wild guess so it's probably dumb), package resolution is a really hard problem with ~=
leading to an exponential number of options and maybe whatever branch cutting algo in place doesn't work well with this set of requirements.
The surprising thing to me as a user of pants is how sensitive build times are to (what I'd consider small) variations of versionsdazzling-dress-95246
04/04/2023, 1:16 AMgoogle-cloud-bigquery-storage
dazzling-dress-95246
04/04/2023, 1:17 AMhappy-kitchen-89482
04/04/2023, 5:08 AMdazzling-dress-95246
04/04/2023, 2:32 PMdazzling-dress-95246
04/04/2023, 2:33 PMhappy-kitchen-89482
04/04/2023, 5:01 PMdazzling-dress-95246
04/06/2023, 5:18 PMdazzling-dress-95246
04/15/2023, 4:12 PM