CryoInTheCloud / hub-image

Default image for NASA's cryocloud hub
BSD 3-Clause "New" or "Revised" License
7 stars 7 forks source link

`/condalock` action is failing #57

Closed MattF-NSIDC closed 1 year ago

MattF-NSIDC commented 1 year ago

e.g.: https://github.com/CryoInTheCloud/hub-image/actions/runs/4940291618

There seems to be nothing wrong with the YAML file it's using as input, as I was able to lock it locally where the action failed. I installed conda-lock with conda, but the action is using pip. The only notable difference between the two environments I saw was that the action has requests 2.30 and my local environment has requests 2.29.

Error message

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.10.11/x64/bin/conda-lock", line 8, in <module>
    sys.exit(main())
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 1353, in lock
    lock_func(
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 1083, in run_lock
    make_lock_files(
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 408, in make_lock_files
    lock_content = lock_content | create_lockfile_from_spec(
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 801, in create_lockfile_from_spec
    deps = _solve_for_arch(
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/conda_lock.py", line 737, in _solve_for_arch
    pip_deps = solve_pypi(
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/pypi_solver.py", line 269, in solve_pypi
    result = s.solve(use_latest=to_update)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/puzzle/solver.py", line 65, in solve
    packages, depths = self._solve(use_latest=use_latest)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/puzzle/solver.py", line 233, in _solve
    result = resolve_version(
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/mixology/__init__.py", line 7, in resolve_version
    return solver.solve()
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/mixology/version_solver.py", line 84, in solve
    next = self._choose_package_version()
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/mixology/version_solver.py", line 377, in _choose_package_version
    packages = self._provider.search_for(dependency)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/puzzle/provider.py", line 139, in search_for
    packages = self._pool.find_packages(dependency)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/repositories/pool.py", line 170, in find_packages
    packages += repo.find_packages(dependency)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/repositories/pypi_repository.py", line 101, in find_packages
    info = self.get_package_info(dependency.name)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/repositories/pypi_repository.py", line 202, in get_package_info
    return self._cache.store("packages").remember_forever(
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/cachy/repository.py", line 174, in remember_forever
    val = value(callback)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/cachy/helpers.py", line 6, in value
    return val()
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/repositories/pypi_repository.py", line 203, in <lambda>
    name, lambda: self._get_package_info(name)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/repositories/pypi_repository.py", line 207, in _get_package_info
    data = self._get("pypi/{}/json".format(name))
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/conda_lock/_vendor/poetry/repositories/pypi_repository.py", line 315, in _get
    json_response = self.session.get(self._base_url + endpoint)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/requests/sessions.py", line 600, in get
    return self.request("GET", url, **kwargs)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/requests/sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/requests/sessions.py", line 745, in send
    r.content
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/requests/models.py", line 899, in content
    self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b""
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/requests/models.py", line 816, in generate
    yield from self.raw.stream(chunk_size, decode_content=True)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/urllib3/response.py", line 935, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/urllib3/response.py", line 874, in read
    data = self._raw_read(amt)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/urllib3/response.py", line 809, in _raw_read
    data = self._fp_read(amt) if not fp_closed else b""
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/urllib3/response.py", line 794, in _fp_read
    return self._fp.read(amt) if amt is not None else self._fp.read()
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/cachecontrol/filewrapper.py", line 96, in read
    self._close()
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/cachecontrol/filewrapper.py", line 76, in _close
    self.__callback(result)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/cachecontrol/controller.py", line 353, in cache_response
    self._cache_set(cache_url, request, response, body, expires_time)
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/cachecontrol/controller.py", line 274, in _cache_set
    self.serializer.dumps(request, response, body),
  File "/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/cachecontrol/serialize.py", line 54, in dumps
    u"strict": response.strict,
AttributeError: 'HTTPResponse' object has no attribute 'strict'
MattF-NSIDC commented 1 year ago

GitHub Actions also have urllib3 2.0.2, but I have 1.26.15. I believe the issue is that cachecontrol is trying to use an interface which was removed in the urllib3 2.x release.

MattF-NSIDC commented 1 year ago

https://github.com/ionrock/cachecontrol/issues/293 https://github.com/ionrock/cachecontrol/issues/292