pulumi / pulumi/pulumi-java

Port output serialization tests

Open
#174 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

area/testing kind/enhancement
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

Capturing a reminder to test out Output value serialization from a Slack thread.

There is rather an extensive suite of tests in Go, we need to eventually match most of this behavior:

https://github.com/pulumi/pulumi/blob/f989e1cc9d639feb045469b536fac8944394fbc1/sdk/go/common/resource/plugin/rpc_test.go#L481

There are especially pertinent cases that may be a bit under-documented but important:

  • If keepOutputs=true feature is on, Outputs with additional data (deps, secret, unknown) serialize into a special Struct shape with a type marker, and explicit dependency lists
  • Outputs without additional data serialize just as their plain value would
  • Unknown outputs serialize to a special computed sentinel
  • TBD - verify how secret outputs serialize

Based on our discussions we currently think this all can work with deleting Input<T> type and simply focusing on the Output<T> type. There may be some degenerate cases like Output<Output<T>> values that serialize ambiguously and don't quite turn around but we may be okay with that since these should not arise in our use cases.

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 with the referenced Go test suite at sdk/go/common/resource/plugin/rpc_test.go around line 481 and locate the corresponding Output serialization code and tests in pulumi-java. Compare the Java behavior with the listed keepOutputs, dependency, secret, unknown, and plain-value cases. Done means the relevant Java tests cover the agreed cases, including the still-undetermined secret-output behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, java
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.