https://pulumi.com logo
#general
Title
# general
b

busy-umbrella-36067

02/26/2019, 11:47 PM
which package is this coming from? Our docker builds recently stopped functioning
Copy code
The Pulumi runtime detected that 200 promises were still active
    at the time that the process exited. There are a few ways that this can occur:
      * Not using `await` or `.then` on a Promise returned from a Pulumi API
      * Introducing a cyclic dependency between two Pulumi Resources
      * A bug in the Pulumi Runtime
w

white-balloon-205

02/27/2019, 12:36 AM
This is most likely related to https://github.com/pulumi/pulumi/issues/2470. If you update to the latest
@pulumi/pulumi
this was fixed.
c

cold-coat-35200

02/27/2019, 10:55 AM
I'm using the latest version, 0.16.6, but still getting this error, yarn outdated does not show any outdated package.
examples:
Copy code
Promise leak detected:
    CONTEXT: resource:ksmKeyAlias[aws:kms/alias:Alias]
    STACK_TRACE:
    Error
        at Object.debuggablePromise (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/runtime/debuggable.js:40:75)
        at Object.registerResource (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/runtime/resource.js:96:18)
        at new Resource (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/resource.js:94:24)
        at new CustomResource (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/resource.js:133:9)
        at new Alias (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/kms/alias.ts:87:9)
        at EtcdCluster.createKmsKey (/home/ncsibra/dev/prmrgt-infra/pulumi/etcd/etcd/cluster.ts:118:9)
        at new EtcdCluster (/home/ncsibra/dev/prmrgt-infra/pulumi/etcd/etcd/cluster.ts:27:28)
        at Object.<anonymous> (/home/ncsibra/dev/prmrgt-infra/pulumi/etcd/index.ts:105:21)
        at Module._compile (internal/modules/cjs/loader.js:738:30)
        at Module.m._compile (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/ts-node/src/index.ts:439:23)
    Promise leak detected:
    CONTEXT: resolveURN(resource:config-bucket[aws:s3/bucket:Bucket])
    STACK_TRACE:
    Error
        at Object.debuggablePromise (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/runtime/debuggable.js:40:75)
        at /home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/runtime/resource.js:158:57
        at Generator.next (<anonymous>)
        at /home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/runtime/resource.js:20:71
        at new Promise (<anonymous>)
        at __awaiter (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/runtime/resource.js:16:12)
        at prepareResource (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/runtime/resource.js:153:12)
        at Object.registerResource (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/runtime/resource.js:90:24)
        at new Resource (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/resource.js:94:24)
        at new CustomResource (/home/ncsibra/dev/prmrgt-infra/pulumi/node_modules/@pulumi/pulumi/resource.js:133:9)
w

white-balloon-205

02/27/2019, 5:04 PM
Cc @lemon-spoon-91807. Could you share your package-lock.json or yarn lock file in DM with Cyrus and I?
c

cold-coat-35200

02/27/2019, 5:12 PM
sure, just sent
b

busy-umbrella-36067

02/27/2019, 6:30 PM
I’m having the weirdest issue, I can’t create two policies on an ECR repository. Just one works, but when trying to create the second one on the same repository I get this:
Copy code
Promise leak detected:
    CONTEXT: resolveURN(resource:redacted-lifecycle-policy2[aws:ecr/lifecyclePolicy:LifecyclePolicy])
    STACK_TRACE:
    Error
        at Object.debuggablePromise (/Users/azamat/git/redacted/redacted/node_modules/@pulumi/pulumi/runtime/debuggable.js:40:75)
        at /Users/azamat/git/redacted/redacted/node_modules/@pulumi/pulumi/runtime/resource.js:158:57
        at Generator.next (<anonymous>)
        at /Users/azamat/git/redacted/redacted/node_modules/@pulumi/pulumi/runtime/resource.js:20:71
        at new Promise (<anonymous>)
        at __awaiter (/Users/azamat/git/redacted/redacted/node_modules/@pulumi/pulumi/runtime/resource.js:16:12)
        at prepareResource (/Users/azamat/git/redacted/redacted/node_modules/@pulumi/pulumi/runtime/resource.js:153:12)
        at Object.registerResource (/Users/azamat/git/redacted/redacted/node_modules/@pulumi/pulumi/runtime/resource.js:90:24)
        at new Resource (/Users/azamat/git/redacted/redacted/node_modules/@pulumi/pulumi/resource.js:94:24)
        at new CustomResource (/Users/azamat/git/redacted/redacted/node_modules/@pulumi/pulumi/resource.js:133:9)
        at new LifecyclePolicy (/Users/azamat/git/redacted/redacted/node_modules/@pulumi/ecr/lifecyclePolicy.ts:129:9)
        at getAllBuilds (/Users/azamat/git/redacted/redacted/lib/manualUtils.js:72:27)
Here’s an example to replicate the promise leaking I’m running into.
Copy code
"use strict";
const pulumi = require("@pulumi/pulumi");
const aws = require("@pulumi/aws");

let repository = new aws.ecr.Repository("repotest");

let repositoryPolicy = new aws.ecr.RepositoryPolicy('policy1', {
    repository: repository.id,
    policy: JSON.stringify({
        Version: "2012-10-17",
        Statement: [
          {
            Sid: "Allow",
            Effect: "Allow",
            Principal: { AWS: "arn:aws:iam::*:root" },
            Action: [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability" ]
          },
        ]
    })
}, { parent: repository });

let repositoryPolicyTwo = new aws.ecr.RepositoryPolicy('policy2', {
    repository: repository.id,
    policy: JSON.stringify({
        Version: "2012-10-17",
        Statement: [
          {
            Sid: "Allow",
            Effect: "Allow",
            Principal: { AWS: "arn:aws:iam::*:root" },
            Action: [ "ecr:GetDownloadUrlForLayer", "ecr:BatchGetImage", "ecr:BatchCheckLayerAvailability" ]
          },
        ]
    })
}, { parent: repository });
l

lemon-spoon-91807

02/27/2019, 7:00 PM
@busy-umbrella-36067 Yup. You're hitting a bug i introduced. Trying to figure out if i can solve it. If not, we'll likely roll back the release without that change imade
@busy-umbrella-36067 @cold-coat-35200 Working on rolling this change back. We've discovered it has fairly fundamental problems that are non-trivial to fix. We'd still like to make the overall change, but we need to do so in a much safer manner.
Very sorry about the inconvenience!
b

busy-umbrella-36067

02/27/2019, 8:19 PM
no worries, thanks for the update
c

cold-coat-35200

02/27/2019, 8:21 PM
yeah, no problem, it doesn't block me