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

Allow specifiying dependencies for output invokes #1482

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

julienp
Copy link
Contributor

@julienp julienp commented Nov 22, 2024

Provider functions that take inputs as arguments, and return an output (aka output form invokes), now allow specifying a depends_on option. This allows programs to ensure that invokes are executed after things they depend on, similar to the depdends_on resource option.

Fixes pulumi/pulumi#17754

@@ -17,7 +17,7 @@
* Options to help control the behavior of @see {@link Deployment#invokeAsync(String, TypeShape, InvokeArgs, InvokeOptions)}.
*/
@ParametersAreNonnullByDefault
public final class InvokeOptions {
public class InvokeOptions {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want InvokeOutputOptions to inherit from this, do we care about this being final?

@julienp julienp marked this pull request as ready for review November 25, 2024 11:46
@julienp julienp requested a review from a team as a code owner November 25, 2024 11:46
}

@Test
void testInvokesDependsOn() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a unit test here, but the language conformance test l2-invoke-options-depends-on is not enabled yet. I spent some time trying to fix program gen to generate something usable, but haven't completed that work yet. The way we generate lambdas is broken, and requires work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Java: DependsOn for Provider Functions
1 participant