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

fix: pull project with removed notifications #11378

Merged
merged 11 commits into from
Nov 21, 2022
Merged

fix: pull project with removed notifications #11378

merged 11 commits into from
Nov 21, 2022

Conversation

lazpavel
Copy link
Contributor

@lazpavel lazpavel commented Nov 11, 2022

Description of changes

  • on pull ensure the project has notifications before attempting to retrieve the channels
  • fix on re-add notifications if previously removed with a version < 10.4.0

Issue #, if available

Description of how you validated changes

  • manual testing
  • tests added

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@lazpavel lazpavel marked this pull request as ready for review November 11, 2022 16:45
@lazpavel lazpavel requested a review from a team as a code owner November 11, 2022 16:45
@lazpavel lazpavel marked this pull request as draft November 11, 2022 17:27
@lazpavel lazpavel marked this pull request as ready for review November 14, 2022 14:31
@yanlin96
Copy link

Hi team,

I found an issue on amplify cli 10.4.0 which may be related.

  1. firstly creating "amplify add notifications" in one environment for example dev
  2. then "amplify env add prod" to create a new environment prod

The error message is "Cannot set property 'Id' of undefined", and if ignore this err and run "amplify push", although command push successfully, the error is in prod "no categorize enabled"

Thanks

@danielleadams
Copy link
Contributor

@yanlin96 - do you mind opening a GitHub Issue for what you are seeing? (https://github.com/aws-amplify/amplify-cli/issues/new/choose) Thanks!

danielleadams
danielleadams previously approved these changes Nov 17, 2022
import { addLegacySmsNotificationChannel, removeLegacyAllNotificationChannel } from '../../../migration-helpers/notifications-helpers';
import { getShortId } from '../../../migration-helpers/utils';

describe('amplify add notifications', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏼

@yanlin96
Copy link

Hi team,

The new issue opened - #11432

@lgtm-com
Copy link

lgtm-com bot commented Nov 18, 2022

This pull request introduces 1 alert when merging e370a52 into 163ab8f - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@lazpavel lazpavel merged commit 091d1d6 into aws-amplify:dev Nov 21, 2022
evcodes pushed a commit to evcodes/amplify-cli that referenced this pull request Dec 9, 2022
* fix: pull project with removed notifications
awsluja pushed a commit to awsluja/amplify-cli that referenced this pull request Dec 16, 2022
* fix: pull project with removed notifications
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants