https://pulumi.com logo
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
python
  • l

    little-river-49422

    02/14/2019, 9:42 PM
    else how would you explain the fact that if you run it in pieces it works?
  • l

    little-river-49422

    02/14/2019, 9:43 PM
    you can try with application\service principal piece
  • l

    little-river-49422

    02/14/2019, 9:43 PM
    its pretty short and seems to have the same flaw
  • l

    little-river-49422

    02/14/2019, 9:44 PM
    i mean, i dont see any other logical end I can come to when I observe such behaviour
  • i

    incalculable-sundown-82514

    02/14/2019, 9:48 PM
    I don’t have an azure setup, give me a minute to check it out
  • l

    little-river-49422

    02/14/2019, 9:49 PM
    hey, no haste at all, i'm just trying to figure out of its me or pulumi 🙂
  • l

    little-river-49422

    02/14/2019, 9:49 PM
    i'm going to sleep anyway. just tell me what you think 😉 when you have something 😉
  • i

    incalculable-sundown-82514

    02/14/2019, 9:52 PM
    sure! It would be super helpful if you could minimize the repro, though - it’s hard to do that when the repo involves cloud resources. I try to use the
    pulumi_random
    package to reproduce bugs since it doesn’t talk to cloud services.
  • i

    incalculable-sundown-82514

    02/14/2019, 9:53 PM
    in this case it’s possible that we’re failing to connect the
    id
    field on `Subnet`; if that’s the case then it should manifest for other resources, as well, which is puzzling.
  • l

    little-river-49422

    02/14/2019, 9:55 PM
    I'm not sure how to use pulumi_random because we seem to have a problem with these particular resources only?
  • l

    little-river-49422

    02/14/2019, 9:55 PM
    all the other "linkings" are fine
  • i

    incalculable-sundown-82514

    02/14/2019, 9:56 PM
    The same code handles all of the resources; there’s nothing special about
    ServicePrincipal
    here.
    id
    is treated specially by the Pulumi runtime, so that’s interesting
  • i

    incalculable-sundown-82514

    02/14/2019, 9:56 PM
    I’ll check it out when I get an azure setup
  • l

    little-river-49422

    02/14/2019, 9:57 PM
    well, i understand that that's the same code behind this. but i think its some edge case?
  • l

    little-river-49422

    02/14/2019, 9:57 PM
    its the
    .id
    in both cases causing it to hiccup**
  • l

    little-river-49422

    02/14/2019, 9:58 PM
    lol
  • l

    little-river-49422

    02/14/2019, 9:58 PM
    from what I got from the docs
    .id
    is the internal identifier
  • l

    little-river-49422

    02/14/2019, 9:58 PM
    and its getting rewritten (questionmark) by the resource output
  • l

    little-river-49422

    02/14/2019, 10:00 PM
    ok, really gotta go sleep, its 1am here. later folks, good luck
  • i

    incalculable-sundown-82514

    02/14/2019, 10:33 PM
    OK, I think I might know what the problem is - digging in further
  • i

    incalculable-sundown-82514

    02/14/2019, 10:49 PM
    figured it out, here’s a fix: https://github.com/pulumi/pulumi/pull/2449
  • i

    incalculable-sundown-82514

    02/14/2019, 10:50 PM
    we’ll get this merged over the next day or two
  • i

    incalculable-sundown-82514

    02/14/2019, 10:52 PM
    tracking issue: https://github.com/pulumi/pulumi/issues/2450
  • l

    little-river-49422

    02/15/2019, 5:33 AM
    😛artypus:
  • l

    little-river-49422

    02/15/2019, 3:39 PM
    will this fix contain the previous one (whatever it was)
  • l

    little-river-49422

    02/15/2019, 3:39 PM
    ah, never mind. previous one was pulumi_kubernetes
  • i

    incalculable-sundown-82514

    02/15/2019, 5:55 PM
    just merged the fix, once the CI finishes up you should be able to do
    pip install --pre pulumi
    and get the fix
    l
    • 2
    • 1
  • i

    incalculable-sundown-82514

    02/15/2019, 5:55 PM
    (CI takes about 30 minutes or so)
  • l

    little-river-49422

    02/15/2019, 9:03 PM
    hey folks, can you educate me how to create a new tutorial for azure? on your docs site
    g
    • 2
    • 22
  • l

    little-river-49422

    02/15/2019, 10:05 PM
    stupid question, is there a way to wait in pulumi? i'm hitting a problem where pulumi cannot detect the azure ad application, i suspect its a race, because if I rerun it works fine
    c
    b
    w
    • 4
    • 35
Powered by Linen
Title
l

little-river-49422

02/15/2019, 10:05 PM
stupid question, is there a way to wait in pulumi? i'm hitting a problem where pulumi cannot detect the azure ad application, i suspect its a race, because if I rerun it works fine
c

creamy-potato-29402

02/15/2019, 10:06 PM
@little-river-49422 (what a name you have btw) you should be able to just depend on a promise with a timeout
you must be booting AKS, right?
This is annoying and is indeed an Azure issue.
l

little-river-49422

02/15/2019, 10:06 PM
yeah, i'm booting aks
it works fine if I precreate azure ad application
but if I create it in the same run it fails
c

creamy-potato-29402

02/15/2019, 10:07 PM
If you rerun it, it usually works. It’s so annoying.
It is a race somewhere in Azure’s API
l

little-river-49422

02/15/2019, 10:07 PM
well, my name ensures unique identified for me across all the possible services on this planet 😉
so there is way to just sleep after creating for a minute?
c

creamy-potato-29402

02/15/2019, 10:08 PM
that must be the old feature you look for in a name? lol
l

little-river-49422

02/15/2019, 10:08 PM
🤣
c

creamy-potato-29402

02/15/2019, 10:09 PM
I forget the exact incantation… @bitter-oil-46081 you are good at javascript, if someone wanted to wait for like 10 or 20 seconds between two resource creations what woudl you do?
only* feature
l

little-river-49422

02/15/2019, 10:09 PM
i suppose I can make everything depend on everything, so it takes as much time to do it
c

creamy-potato-29402

02/15/2019, 10:09 PM
you should already be depending on the AD principal and stuff, I think
l

little-river-49422

02/15/2019, 10:09 PM
well, being unique is kinda important, yeah, nobody remembers how its spelled, but they always know its me 🙂
yeah, but when app is created its not available isntanly, its kind of a known azure thing
or maybe, there is a retry mechanism in pulumi
that would be better
c

creamy-potato-29402

02/15/2019, 10:10 PM
oh right
python
my b
this I really don’t know
l

little-river-49422

02/15/2019, 10:11 PM
well, retry, if exists, wont be unique to python 😉
c

creamy-potato-29402

02/15/2019, 10:11 PM
I was going to suggest some kind of
setTimeout
but that’s the wrong language
we do retries sometiems. Mostly in kubernetes.
b

bitter-oil-46081

02/15/2019, 10:11 PM
In js you can do the following:
function sleep(ms: number) {
                    return new Promise((resolve) => {
                        setTimeout(resolve, ms);
                    });
                }
And then await the promise.
I think In python you could just call sleep.
c

creamy-potato-29402

02/15/2019, 10:12 PM
But in Python… do they have promises?
l

little-river-49422

02/15/2019, 10:12 PM
mm, let me try something
w

white-balloon-205

02/15/2019, 10:14 PM
So - just to be clear - this is a bug in the underlying Terraform Azure provider - and you should not have to manually wait. It is part of the contract of creating a resource that it is ready to be interacted with after completing creation. I believe we thought this was fixed with https://github.com/terraform-providers/terraform-provider-azurerm/pull/2204, but it seems like perhaps it is not. Regardless, it should be possible to add a wait per what @bitter-oil-46081 and @creamy-potato-29402 are suggesting - I just want to be clear that is working around a bug, not something you should need to do in the limit.
l

little-river-49422

02/15/2019, 10:15 PM
i know 😉
👍 1
ok, i'll probably push first draft tomorrow, its 1.20 here
thanks folks, best of luck. later.
View count: 1