-
Notifications
You must be signed in to change notification settings - Fork 6
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
Unable to Upgrade Resource State #272
Comments
Hi @mortaelth thank you for reporting this issue! Unfortunately I cannot reproduce this problem by (1) creating a stack on 4.10.0 (2) upgrading to 4.11.2 (3) running pulumi up - I get an empty update. I'm trying this code since
When I provision this stack with 4.10.0 I observe this entry in the state (
I'm wondering if your state is missing __meta or has schema_version 0 instead of |
Hello @t0yv0, thank you for analysis. The __meta is truly missing in the state: {
"urn": "urn:pulumi:aks-test3::aks-test3::piq-core:mysql$random:index/randomString:RandomString::adminUserName",
"custom": true,
"id": "xxx",
"type": "random:index/randomString:RandomString",
"inputs": {
"__defaults": [
"lower",
"minLower",
"minNumeric",
"minSpecial",
"minUpper",
"upper"
],
"length": 16,
"lower": true,
"minLower": 0,
"minNumeric": 0,
"minSpecial": 0,
"minUpper": 0,
"number": false,
"special": false,
"upper": true
},
"outputs": {
"id": "xxx",
"length": 16,
"lower": true,
"minLower": 0,
"minNumeric": 0,
"minSpecial": 0,
"minUpper": 0,
"number": false,
"numeric": false,
"result": "xxx",
"special": false,
"upper": true
},
"parent": "urn:pulumi:aks-test3::aks-test3::piq-core:mysql::mysql-server",
"provider": "urn:pulumi:aks-test3::aks-test3::pulumi:providers:random::default_4_10_0::a4906b93-3dd6-4e3a-b1a9-176f7ddd39bf",
"propertyDependencies": {
"length": null,
"number": null,
"special": null
}
}, Not sure why is that so. I know we were downgrading from 4.11.1 due to the other issue mentioned above, but otherwise I think we were not doing anything unordinary. |
As a workaround if you inject the __meta declaration in the state and do a I suspect this is because of the #258 bug and possibly using the affected provider version to provision the resource and write the state. I will need to look into adding state upgrade hooks so we could code some auto-correcting logic to fix this up for affected stacks as part of normal Pulumi operation. |
Thank you, we would rather wait for the autocorrect mechanism, as we have quite a lot of stacks managed by several teams, so it seems safer for now. |
@mortaelth please try v4.11.3 I think this should fix the problem, if it doesn't please reopen with a repro I'd love to get this all working right for your teams. |
Already did, the upgrade went well, although I did not see the __meta in
the state after the upgrade
Dne st 8. bře 2023 16:28 uživatel Anton Tayanovskyy <
***@***.***> napsal:
… @mortaelth <https://github.com/mortaelth> please try v4.11.3 I think this
should fix the problem, if it doesn't please reopen with a repro I'd love
to get this all working right for your teams.
—
Reply to this email directly, view it on GitHub
<#272 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALOCFMOZHU7EQKDMDVODWO3W3CQQ3ANCNFSM6AAAAAAVGR77NU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes that's expected - unfortunately the current "migrate on read" code does not write it back to state. It will add __meta next time it needs to write state, that is on next update/replace. I think RandomString never updates, so that'd be a replace. |
What happened?
I am receiving error when upgrading pulumi/random from 4.10.0 to 4.11.2
using this code:
received error:
note: we cannot upgrade from 4.10.0 to 4.11.1 either due to pulumi/pulumi-terraform-bridge#810
Expected Behavior
no change of the output during upgrade / no error
Steps to reproduce
use the code above in 4.10.0 and upgrade to 4.11.2
Output of
pulumi about
Version 3.51.1
Go Version go1.19.4
Go Compiler gc
Plugins
NAME VERSION
azure 5.35.0
azure-native 1.95.0
azuread 4.3.0
command 0.7.1
grafana 0.0.5
kubernetes 3.24.1
nodejs unknown
random 4.11.2
@types/node 8.10.66
typescript 4.9.5
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
The text was updated successfully, but these errors were encountered: