aws-amplify / aws-amplify/amplify-cli

CLI Shows wrong status message when user pulls changes that happened on the cloud

Open
#12,232 1 comment 0 reactions 0 assignees View on GitHub
bug p2 platform-pull
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### How did you install the Amplify CLI?

npm

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

v19.1.0

### Amplify CLI Version

11.0.0

### What operating system are you using?

macOS

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

No manual changes made

### Describe the bug

Initial state: User has API library with GraphQL on their project

Problem: If user updates the Data (by adding new data classes or updating the current ones) over Amplify Studio and deploys it, the error message when they pull from cloud shows no changes as status but the schema.graphql is updated.

```bash
msalihg@ testapp % amplify pull --appId --envName dev

Pre-pull status:

Current Environment: dev

┌──────────┬───────────────┬───────────┬───────────────────┐
│ Category │ Resource name │ Operation │ Provider plugin │
├──────────┼───────────────┼───────────┼───────────────────┤
│ Api │ testapp │ No Change │ awscloudformation │
└──────────┴───────────────┴───────────┴───────────────────┘

```

### Expected behavior

CLI shows there has been an update to API category.

### Reproduction steps

1. Add API category to the project
2. Push your changes to cloud
3. Enable Amplify Studio
4. Update the model data from the Data section
5. Deploy the changes
6. Pull the changes from the provided `amplify pull` command
Current:
You will see "No Change" on the API category even though the schema.graphql file is updated.
Expected:
CLI shows there has been an update to API category.

### Project Identifier

N/A

### Log output

N/A

### Additional information

Tested it out with Android and Flutter libraries.

### Before submitting, please confirm:

- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
- [X] I have removed any sensitive information from my code snippets and submission.

Contributor guide

Open the contributing guide

Research direction

Reproduce the listed Amplify Studio data-model update, deployment, and `amplify pull` sequence with the API category, then compare the reported status with the changed `schema.graphql` file. Done means the CLI reports an API update instead of "No Change" when the cloud schema has changed; the issue names no source file or test to start from.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, graphql, typescript
Domain
api, cli, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.