-
Notifications
You must be signed in to change notification settings - Fork 824
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
Cannot pull or switch between environments containing notifications #6475
Comments
It might be that this value never gets updated (instead of getting pulled from team-provider-info.json). So if you create an environment from another environment then the value propagates to each environment without being updated. |
I have tracked down the "source" of the old app id on new environments. It is pulled from the appId in the parameters.json in the folder alongside the cloudformation file for example in file This appId at the bottom never gets updated and thus the value in the amplify-meta.json is always pointing to the wrong pinpoint.
Not only does the appId not change but none of these resources exist anymore as the environment is long torn down. |
I am looking at the PR for this change and could you explain something to me? Does this change mean you can only have one pinpoint app? Because multiple pinpoint apps was working before if you manually updated those two values in my first message. Is there a reason you have only forced the one environment? Also, I have sandboxes for feature branches and I think looking at it that if I teardown one environment it will still remove the pinpoint application and thus destroy all other environments. This actually makes the situation worse over the original? |
This still isnt working correctly on the latest version When I created a new environment it created a new pinpoint app but left the amplify-meta.json pointing to the original environment. So I was in environment "master" and run a headless script to create environment "test". There was now two apps called "myNotifications-master" and "myNotification-test" but the meta still points to "myNotifications-master". When I then called |
@attilah @renebrandel @kaustavghosh06 This is NOT fixed and is much worse! To workaround this I have had to put this script in for post init of a new environment (and then re-push). Otherwise the values are still wrong and the original (master env for me) pinpoint gets torn down when the new environment is torn down and the new pinpoint gets left instead
|
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Describe the bug
I opened an issue yesterday on this but I was looking in the wrong place #6469 and I also have experienced this before in #5056. Both times I thought it was old issue or a config issue but there is definitely a recurring problem that breaks my CI pipeline on a regular basis.
I think the reason this is occurring due to one particular value in amplify-meta.json not being updated correctly. I think it pulls from the first environment in team-provider-info.json instead of the environment you are trying to initialise. This means if you destroy the other environment the new environment is broken because it cannot update the APNS/FCM resources for wrong and old environment and thus prevents you switching or pulling environment.
This is the amplify-meta.json of a newly created environment from my machine. I had one environment called "core" before running init again. After creating the environment and then downloading the amplify-meta.json from the deploy bucket you can see the value below still points the pinpoint appid of the "core" environment and not the new appid.
If I now teardown "core" then this new environment is now completely broken (cannot pull or checkout). To correct I have to edit the amplify-meta.json in the #current-cloud-backend.zip and reupload it just to fix it
Amplify CLI Version
4.41.2
To Reproduce
See above
Expected behavior
This value should be updated to the current environment settings from team-provider-info.json
Desktop (please complete the following information):
Log output
None really
The text was updated successfully, but these errors were encountered: