pulumi / pulumi/pulumi-java

Simplify Runner further

Open
#668 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/languages kind/enhancement language/java
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

Previously in ##642 I've decoupled Stack and Runner and simplified both.

As kindly suggested by @t0yv0 we have an opportunity to simplify Runner even further:

  • https://github.com/pulumi/pulumi-java/pull/642/files#r889038759 - try to achieve <T> CompletableFuture<T> runAsync(Supplier<T> callback); signature or even CompletableFuture<Void> run() if it does not break the semantics.
  • we can move the exit code related error handling to the PulumiInternal and expose it only in Pulumi because it is only useful for the CLI, but not in PulumiTest and PulumiAuto.

This has implications for the Pulumi, PulumiTest and PulumiAuto APIs (because we need to expose to the user all things needed but not more):

  • since the exit code is not useful for the user and is internal-ish, we could stop exposing it in the Result (an maybe remove Result)
  • knowing what errors and exceptions happened is useful for PulumiTest
  • knowing what exceptions happened is useful for PulumiAuto, but maybe better semantics would be to just throw on join?
  • mimicking pulumi command can also be useful considerations for better DX: https://github.com/pulumi/pulumi-java/pull/642/files#r888932515

This issue can benefit from more careful consideration regarding consistency in the semantics between different flavours of the API as well as from considering inherent similarities and differences between various modes of operation.

Affected area/feature

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing pull request 642 and its linked comments, then trace the Runner, PulumiInternal, Pulumi, PulumiTest, PulumiAuto, and Result APIs named in the issue. Done requires an agreed design and consistent semantics for asynchronous execution, exit-code handling, and exception reporting across the API variants.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design, developer-experience
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.