Giter VIP home page Giter VIP logo

Comments (6)

Frassle avatar Frassle commented on May 31, 2024

Calling pulumi up isn't working since 3.112.0. 3.111.1 is working fine.

Is this changing the version of the pulumi python library or the CLI or both? Does it work on 3.112 CLI if you use 3.111.1 of the python library? Likewise how about 3.111.1 CLI with 3.112 python library?

from pulumi.

nexeck avatar nexeck commented on May 31, 2024

I did a few test runs with the different version combinations. The CLI always works when the python lib version is 3.111.1

CLI Python Library Result
3.111.1 3.111.1 Works
3.111.1 3.112.0 IndexError: list index out of range
3.111.1 3.113.0 IndexError: list index out of range
3.112.0 3.111.1 Works
3.112.0 3.112.0 IndexError: list index out of range
3.112.0 3.113.0 IndexError: list index out of range
3.113.0 3.111.1 Works
3.113.0 3.112.0 IndexError: list index out of range
3.113.0 3.113.0 IndexError: list index out of range

from pulumi.

nexeck avatar nexeck commented on May 31, 2024

Not sure if it helps, thats with --debug (Python lib & CLI 3.113.0)

debug: waiting for quiescence; 8874 outputs outstanding
    debug: waiting for quiescence; 8873 outputs outstanding
    debug: waiting for quiescence; 8872 outputs outstanding
    debug: waiting for quiescence; 8871 outputs outstanding
    error: Program failed with an unhandled exception:
    Traceback (most recent call last):
      File "/opt/homebrew/bin/pulumi-language-python-exec", line 191, in <module>
        loop.run_until_complete(coro)
      File "/opt/homebrew/Cellar/[email protected]/3.12.2_1/Frameworks/Python.framework/Versions/3.12/lib/python3.12/asyncio/base_events.py", line 685, in run_until_complete
        return future.result()
               ^^^^^^^^^^^^^^^
      File "/Users/REDACTED/.venv/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 132, in run_in_stack
        await run_pulumi_func(run)
      File "/Users/REDACTED/.venv/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 53, in run_pulumi_func
        await wait_for_rpcs()
      File "/Users/REDACTED/.venv/lib/python3.12/site-packages/pulumi/runtime/stack.py", line 109, in wait_for_rpcs
        await task
    IndexError: list index out of range

from pulumi.

Frassle avatar Frassle commented on May 31, 2024

Ok thanks that narrows it down to an issue with the library not the CLI. I have a suspicion to what change could have caused this.

from pulumi.

Frassle avatar Frassle commented on May 31, 2024

So https://github.com/pulumi/pulumi/pull/15744/files changed how we wait for outputs and async tasks. I think this may have had the effect that an exception your code was throwing that used to be ignored/missed is now detected.

Worth taking a look at https://docs.python.org/3/library/asyncio-dev.html and running your program on 3.111.1 with debugging turned on to see if it picks up any uncaught exceptions.

from pulumi.

nexeck avatar nexeck commented on May 31, 2024

Thanks for the quick support

The following code caused the issue:

import time

import pulumi


async def wait_for_eventual_consistency(args: list) -> bool:
    resource_id = args[0]
    duration = 5 if args[1] is None else int(args[1])

    if not pulumi.runtime.is_dry_run():
        pulumi.log.info(
            f"Waiting {duration} seconds for eventual consistency for resource {resource_id}"
        )

        time.sleep(duration)
    return True
pulumi.Output.all(account.id).apply(pkg.wait_for_eventual_consistency)

With this error:

        duration = 5 if args[1] is None else int(args[1])
                        ~~~~^^^
    IndexError: list index out of range

from pulumi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.