aws-amplify / aws-amplify/amplify-cli

unnecessary feature flag check on `amplify version`, `upgrade`, and `uninstall`

Open
#10,514 3 comments 1 reaction 0 assignees View on GitHub
feature-request p4 platform
Dominant language
TypeScript
Stars
2.9k
Forks
825
Avg merge
11d 23h
Merged PRs (30d)
2

Description

### Before opening, please confirm:

- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-cli/blob/master/CONTRIBUTING.md#bug-reports).
- [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.

### How did you install the Amplify CLI?

pnpm

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

v16.14.2

### Amplify CLI Version

8.2.0

### What operating system are you using?

mac

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

no

### Amplify Categories

Not applicable

### Amplify Commands

Not applicable

### Describe the bug

```
josef ~/D/p/a/r/my-project
> amplify upgrade
🛑 Invalid feature flag configuration

🛑 These feature flags are defined in the "amplify/cli.json" configuration file and are unknown to the currently running Amplify CLI:
- graphqltransformer.usefieldnameforprimarykeyconnectionfield

🛑 This issue likely happens when the project has been pushed with a newer version of Amplify CLI, try updating to a newer version.

🛑 Learn more about feature flags: https://docs.amplify.aws/cli/reference/feature-flags

josef ~/D/p/a/r/my-project
> amplify version
🛑 Invalid feature flag configuration

🛑 These feature flags are defined in the "amplify/cli.json" configuration file and are unknown to the currently running Amplify CLI:
- graphqltransformer.usefieldnameforprimarykeyconnectionfield

🛑 This issue likely happens when the project has been pushed with a newer version of Amplify CLI, try updating to a newer version.

🛑 Learn more about feature flags: https://docs.amplify.aws/cli/reference/feature-flags

josef ~/D/p/a/r/my-project
> amplify uninstall
🛑 Invalid feature flag configuration

🛑 These feature flags are defined in the "amplify/cli.json" configuration file and are unknown to the currently running Amplify CLI:
- graphqltransformer.usefieldnameforprimarykeyconnectionfield

🛑 This issue likely happens when the project has been pushed with a newer version of Amplify CLI, try updating to a newer version.

🛑 Learn more about feature flags: https://docs.amplify.aws/cli/reference/feature-flags
```

### Expected behavior

no feature flags checks are made and command is able to proceed

### Reproduction steps

1. with the latest version of the CLI, create a new project with `amplify init -y`
2. add an unknown feature flag to `amplify/cli.json`
3. run `amplify version`, `upgrade`, or `uninstall`
4. observe error

### GraphQL schema(s)

```graphql
# Put schemas below this line

```

### Log output

```
# Put your logs below this line

```

### Additional information

_No response_

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue by adding an unknown flag to amplify/cli.json, then run amplify version, amplify upgrade, and amplify uninstall. Trace the implementations of those three CLI commands to identify where feature-flag validation is invoked, and verify that each command proceeds without that check while other commands retain their existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 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.