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

Setting both Parent and DependsOn to the same component causes hang #122

Open
justinvp opened this issue Mar 27, 2023 · 2 comments
Open
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec

Comments

@justinvp
Copy link
Member

The following program hangs:

using System.Collections.Generic;
using Pulumi;

return await Deployment.RunAsync(() =>
{
   var parent = new ComponentResource("pkg:index:first", "first");
   var child = new ComponentResource(
      "pkg:index:second",
      "second",
      new ComponentResourceOptions
      {
         Parent = parent,
         DependsOn = new[]{ parent},
      }
   );

   // This would freeze before the fix.
   var custom = new CustomResource(
      "foo:bar:baz",
      "myresource",
      ResourceArgs.Empty,
      new CustomResourceOptions
      {
         Parent = child,
      }
   );

   // Export outputs here
   return new Dictionary<string, object?>
   {
      ["outputKey"] = "outputValue"
   };
});

More details in pulumi/pulumi#12032

@justinvp justinvp added the kind/bug Some behavior is incorrect or out of spec label Mar 27, 2023
@justinvp justinvp added this to the 0.87 milestone Mar 27, 2023
@justinvp justinvp self-assigned this Mar 27, 2023
@justinvp
Copy link
Member Author

I have a local fix. Interestingly, when run from a test (using mocks), the test does not hang. But a local program using pulumi up does.

@justinvp
Copy link
Member Author

When addressing this, make sure more complex relationships also do not hang: pulumi/pulumi#12736

@justinvp justinvp modified the milestones: 0.88, 0.89 May 13, 2023
@justinvp justinvp modified the milestones: 0.89, 0.90 Jun 6, 2023
@mikhailshilkov mikhailshilkov removed this from the 0.90 milestone Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

2 participants