Permit user programs that decide on stack outputs in a Future
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 85
- Forks
- 26
- Avg merge
- 11h 49m
- Merged PRs (30d)
- 22
Description
Hello!
- Vote on this issue by adding a 👍 reaction
- If you want to implement this feature, comment to let us know (we'll work with you on design, scheduling, etc.)
Issue details
Current signature Pulumi.run assumes that the program will immediately register the stack outputs:
Pulumi.run(ctx -> {
ctx.export("a", Output.of(1));
});
What if the program does not know what the set of stack outputs is going to be until some CompletableFuture? The awkward workaround right now is to force (join) the Future inside the Pulumi program:
CompletableFuture<String> xname;
Pulumi.run(ctx -> {
var x = xname.join();
ctx.export(x, Output.of(1));
});
It would be nice to allow deferring that without blocking a thread. Perhaps Pulumi.run(Function<Context,CompletableFuture<Void>>) overload to let the user program signal to the framework that it has some work to do.
I believe underlying framework supports this just fine, but we do not expose this capability to the user at the moment.
Not sure how useful this is in practice, but logging for posterity.
Affected area/feature
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing Pulumi.run API and the framework's current handling of CompletableFuture-based work. Clarify the overload design, then verify that deferred stack outputs can be registered without blocking and add coverage for the asynchronous completion behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100