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

Amplify Status and Push Not Reflecting New Analytics and Function Changes #13500

Closed
2 tasks done
alpha-adam opened this issue Dec 21, 2023 · 8 comments
Closed
2 tasks done
Labels
multienv Issues tied to multiple environment feature in the CLI pending-triage Issue is pending triage

Comments

@alpha-adam
Copy link

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

18

Amplify CLI Version

12.1

What operating system are you using?

linux, cloud9

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

NA

Describe the bug

When using AWS Amplify CLI, new additions to my project (specifically analytics and a function) are not being recognized. Despite successfully adding these components and ensuring they are present in the team-provider-info and backend-config files, running amplify status or amplify push does not reflect these changes.

Expected behavior

I expected amplify status to show the newly added analytics and function, and amplify push to update these additions in the cloud environment.

Reproduction steps

Add new analytics and a function to the Amplify project.
Push changes to the Git repository.
Observe that both dev and prod branches are synchronized.
Run amplify status and amplify push.
Notice that the new additions are not listed or updated.

Project Identifier

ba02cdbba92e71aa235c621a1b28c279

Log output

NA

Additional information

Amplify Environments: dev, prod
Git Branches: dev, prod
Setup includes multiple categories (auth, api, function, storage)
The issue persists despite ensuring the correct file locations for changes and following the standard sequence of Amplify commands.

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@alpha-adam alpha-adam added the pending-triage Issue is pending triage label Dec 21, 2023
@ykethan
Copy link
Member

ykethan commented Dec 21, 2023

Hey @alpha-adam, thank you for reaching out. Wanted to get a bit more information on the reproduction steps
After the Add new analytics and a function to the Amplify project and before Push changes to the Git repository are you running a amplify push?
Are the branches connected to Amplify hosting CICD builds? As once the hosting build runs the backend build we should be able to run amplify pull to pull the changes.
are you observing any error messages on the push?

@alpha-adam
Copy link
Author

I'll write a more detailed reproduction here.

  1. Add function / analytics to amplify env dev
  2. amplify push
  3. git push origin dev
  4. then in a seperate cloud9 terminal set up with prod env and branch already
  5. git pull origin dev (no conflicts, in prod we can see in backend-config.json new function and analytics)
  6. verify that git prod and dev are up to date
  7. amplify push / status in prod does not show the new added categories
  8. cry

I'm trying to use the dev / prod workflow shown here: https://docs.amplify.aws/react-native/tools/cli/teams/

Thanks in advance!

@ykethan ykethan added multienv Issues tied to multiple environment feature in the CLI investigating This issue is being investigated labels Dec 22, 2023
@ykethan
Copy link
Member

ykethan commented Dec 27, 2023

Hey @alpha-adam, thank you for the information. We will need to run amplify env checkout <env-name>, this should generate the amplify-meta.json with the changes, then running amplify status should show the matrix with the new resources.

@ykethan ykethan added pending-response Issue is pending response from the issue author and removed investigating This issue is being investigated labels Dec 27, 2023
@alpha-adam
Copy link
Author

I see. I have two cloud9 envs set up for each of the different amplify envs, and I pull the changes with git. So that must be why the meta file is not being properly generated, because the checkout step is not being done in my case. I will test out your suggestion soon and report back.

Cheers!

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Dec 27, 2023
@ykethan
Copy link
Member

ykethan commented Dec 27, 2023

Adding the response-response label for now, do let us know if this mitigates the issue.

@ykethan ykethan added the pending-response Issue is pending response from the issue author label Dec 27, 2023
@alpha-adam
Copy link
Author

Just confirmed that this solution worked. It also solved another problem that I was having; where the prod environment was having configuration issues with secretes and function versions. I suggest adding a note to the documentation to point out that the env checkout is an important step. Otherwise, people who use two seperate workspaces for each env will run into this same problem.

Thanks for your help! Much appreciated!

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue author label Dec 30, 2023
@ykethan
Copy link
Member

ykethan commented Jan 2, 2024

@alpha-adam Glad to hear you were able to mitigate the issue. Let me forward this feedback to the team.
Closing the issue, do reach out to us if you experience any issues.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2024
Copy link

github-actions bot commented Jan 2, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multienv Issues tied to multiple environment feature in the CLI pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

2 participants