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

Env Issue on https://www.pulumi.com/registry/packages/digitalocean/api-docs/app/#create #308

Open
driedel1987 opened this issue May 25, 2022 · 7 comments
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). blocked The issue cannot be resolved without 3rd party action. kind/bug Some behavior is incorrect or out of spec

Comments

@driedel1987
Copy link

driedel1987 commented May 25, 2022

I think there is an issue if you create an app with the "https://www.pulumi.com/registry/packages/digitalocean/api-docs/app/#create" operation if you include env variables.

If you create the app all is fine and working. But if you try to update the App with the same method, Pulumi recognizes changes and wants to update the app envs.

I did the following:

The NewApp creates all the environments variables for the app - all fine.
But if i started the update process pulumi wants to change all the environment variables and if i execute this it runs in a timeout.
What i understand is, that digital ocean app has another env order as pulumi. On creation the order is different as on update. And pulumi wants to order it new. Digital Ocean is ready after 1 sec because he sees no change and pulumi is doing update and after not sure a lot of minutes running in an timeout.
i will attach some screen for explanation - i think this is not so easy to understand

Here some pictures for explanation:

First picture is a part of my array for the env in code for creation and updating. Second picture is the created order in digital ocean after creation process. Third picture is what pulumi wants to do on update (order new) and runs in a timeout.

image
image
image

I discussed this already in slack. Here is the conversation:

David Riedel Gestern um 16:00 Uhr
Currently i am doing an preview operation in the automation api(golang) and the preview shows a diff for the image tag as expected:
~ tag : "0.0.12" => "0.0.11"
but result is at the end is
Ressource "1 unchanged"
why is pulumi not recognizing this change and is redeploying the app on Up call?
iam trying to update an app (https://www.pulumi.com/registry/packages/digitalocean/api-docs/app/#look-up)
9 Antworten

Fraser Waters vor 18 Stunden
Are you trying to lookup and change a resource in one update?

David Riedel vor 15 Stunden
i will try to explain what iam doing :leichtes_lächeln:
Creating new app with the golang automation api (https://www.pulumi.com/registry/packages/digitalocean/api-docs/app/#example-usage) including a lot of env app variables and health check configuration.
I am assigning the app configuration to a pulumi.RunFunc variable and executing it later with Up. Before iam doing newstackinlinesource and setconfig. After the creation i am storing the cloud ressourc id in a postgres db for accessing later.
This all is working as expected and i am getting a helathy app including a state in pulumi dashboard.
2. For Update i am using the lookup function (https://www.pulumi.com/registry/packages/digitalocean/api-docs/app/#look-up). The Lookup pulumi.RunFunc is configured like the new app i created in step 1 plus the stored cloud ressource id to address my already created app.
Instead of using the newstackinlinesource iam using the selectinlinesource in this function. Rest is the same as in creation of the app.
Unfortunately the diff on the Up function shows an change for example for the image tag which should be deployed but pulumi does not deploy it.
Every time iam doing a change for example in my envs or something else pulumi is not updating my deployed app. Pulumi up is showing the change if i add the diff opt parameter
httpPort : 3000
~ image : {
registryType: "DOCR"
repository : "examplerepo"
~ tag : "0.0.12" => "0.0.10"
}
but the app is not updated and deployed new.
Iam not using preview and update in one update. (bearbeitet)

David Riedel vor 15 Stunden
ah and thank you ahead for taking time for my problem :leichtes_lächeln:

tenwit vor 13 Stunden
It sounds like you have different chunks of code to manage one resource: one chunk if you cannot find it (new) and one chunk if you can (update). Is that right?

tenwit vor 13 Stunden
That is an imperative solution, but Pulumi is declarative and does not work that way. Just use the "new" chunk. Don't look up the existing resource. Pulumi figures out that the resource already exists, and just updates the bits that need to change.

David Riedel vor 1 Stunde
thanks :leichtes_lächeln:
I tried this before my get solution.
But there was one problem. The NewApp creates all the environments variables for the app - all fine.
But if i started the update process pulumi wants to change all the environment variables and if i execute this it runs in a timeout.
What i understand is, that digital ocean app has another env order as pulumi. On creation the order is different as on update. And pulumi wants to order it new. Digital Ocean is ready after 1 sec because he sees no change and pulumi is doing update and after not sure a lot of minutes running in an timeout.
i will attach some screen for explanation - i think this is not so easy to understand

David Riedel vor 1 Stunde
First picture is my array for the env in code for creation and updating (it is the same function as you told), Second picture is the created order in digital ocean after creation process, Third pricture is what pulumi wants to do on update (order new) - runs in an timeout
3 Dateien
Bildschirmfoto vom 2022-05-25 10-01-38.png

Bildschirmfoto vom 2022-05-25 10-01-12.png

Bildschirmfoto vom 2022-05-25 10-01-55.png

David Riedel vor 1 Stunde
this seems like a bug or?

Fraser Waters vor 40 Minuten
That sounds like a normalisation bug. Can you raise an issue at https://github.com/pulumi/pulumi-digitalocean/issues

@stack72
Copy link
Contributor

stack72 commented May 30, 2022

This may be related to the following issue upstream digitalocean/terraform-provider-digitalocean#782

We will monitor the upstream repo to see if there are any changes here

@stack72 stack72 added awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). kind/bug Some behavior is incorrect or out of spec labels May 30, 2022
@zafai
Copy link

zafai commented Jul 11, 2022

@stack72 in Issue digitalocean/terraform-provider-digitalocean#782 @scotchneat provided information that this is an issue where Pulumi needs to have a could you please look into this?

Thank you

@driedel1987
Copy link
Author

any updates here ?

@driedel1987
Copy link
Author

driedel1987 commented Sep 13, 2022

Seems also to be related to this issue --> digitalocean/terraform-provider-digitalocean#869

@mjeffryes mjeffryes added the awaiting-feedback Blocked on input from the author label Sep 26, 2024
@mjeffryes
Copy link
Member

Unfortunately, it looks like this issue hasn't seen any updates in a while. If you're still encountering this problem, could you leave a quick comment to let us know so we can prioritize it?

@netgeniaRiedel
Copy link

This is still a problem and not working. The workaround from terraform i think is not usable in the context of pulumi .

@pulumi-bot pulumi-bot added needs-triage Needs attention from the triage team and removed awaiting-feedback Blocked on input from the author labels Sep 27, 2024
@guineveresaenger
Copy link
Contributor

Thank you for letting us know - we will add this issue to our planning.

@guineveresaenger guineveresaenger removed the needs-triage Needs attention from the triage team label Sep 27, 2024
@mjeffryes mjeffryes added this to the 0.111 milestone Oct 2, 2024
@iwahbe iwahbe added the blocked The issue cannot be resolved without 3rd party action. label Oct 8, 2024
@mjeffryes mjeffryes removed this from the 0.111 milestone Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-upstream The issue cannot be resolved without action in another repository (may be owned by Pulumi). blocked The issue cannot be resolved without 3rd party action. kind/bug Some behavior is incorrect or out of spec
Projects
None yet
Development

No branches or pull requests

8 participants