Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to build layer using resources leads to Index Out of Range #54

Open
tgolsson opened this issue Aug 24, 2023 · 0 comments
Open
Labels
t: bug Something isn't working

Comments

@tgolsson
Copy link
Owner

Describe the bug
Stacktrace:

Traceback (most recent call last):
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/core/goals/repl.py", line 127, in run_repl
    request = await Get(ReplRequest, ReplImplementation, repl_impl)
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 118, in __await__
    result = yield self
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "<pants-cache-dir>/named_caches/pex_root/venvs/s/32db4f38/venv/lib/python3.9/site-packages/pants_backend_oci/goals/run.py", line 213, in run_oci_command_repl
    process = await Get(Process, RunImageBundleProcessRequest(request.targets[0], interactive=True))
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 118, in __await__
    result = yield self
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "<pants-cache-dir>/named_caches/pex_root/venvs/s/32db4f38/venv/lib/python3.9/site-packages/pants_backend_oci/goals/run.py", line 93, in prepare_run_image_bundle
    tool, image, rundir, shims = await MultiGet(
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 479, in MultiGet
    return await _MultiGet((__arg0, __arg1, __arg2, __arg3))
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 165, in __await__
    result = yield self.gets
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "<pants-cache-dir>/named_caches/pex_root/venvs/s/32db4f38/venv/lib/python3.9/site-packages/pants_backend_oci/language_target/python.py", line 119, in build_python_image
    base_image, umoci, *layers = await MultiGet(
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 464, in MultiGet
    return await _MultiGet((__arg0, __arg1, __arg2, __arg3, __arg4))
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 165, in __await__
    result = yield self.gets
  File "<cache-dir>/bindings/venvs/2.16.0/lib/python3.9/site-packages/pants/engine/internals/selectors.py", line 623, in native_engine_generator_send
    res = rule.send(arg) if err is None else rule.throw(throw or err)
  File "<pants-cache-dir>/named_caches/pex_root/venvs/s/32db4f38/venv/lib/python3.9/site-packages/pants_backend_oci/util_rules/layer.py", line 145, in build_image_layer
    raw_layer_digest, layer_name = real_layers[0]
IndexError: list index out of range

To Reproduce

Include a resources-target in a Python image.

@tgolsson tgolsson added the t: bug Something isn't working label Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant