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(cli): better error message when trying to publish with CD configured in Amplify Console #7874

Merged

Conversation

Bentheburrito
Copy link
Contributor

Description of changes

Running amplify publish will now error with "You have already connected branches to your Amplify Console app. Please visit the Amplify Console to manage your branches." when CD is configured in the Amplify Console, re #7486.

Issue #, if available

fix #7486

Description of how you validated changes

  • Manually test with CD configured and no hosting
    • amplify init in new react project
      • pushed to GitHub repository and connected main branch to frontend on Amplify Console
      • ran amplify-dev publish
      • got "You have already connected branches..." message
    • amplify init another react project
      • ran amplify-dev publish without adding hosting or connecting a branch
      • got "Please add hosting..." message
  • yarn test
  • yarn lint

Checklist

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

@Bentheburrito Bentheburrito requested a review from a team as a code owner August 3, 2021 21:23
Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

One nit, but LGTM

Copy link
Contributor

@cjihrig cjihrig left a comment

Choose a reason for hiding this comment

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

LGTM, thanks.

@cjihrig cjihrig self-assigned this Aug 4, 2021
@cjihrig cjihrig merged commit 4f03859 into aws-amplify:master Aug 25, 2021
jhockett pushed a commit that referenced this pull request Aug 25, 2021
…red in Amplify Console (#7874)

* fix(cli): add specific check for cd branches when running `amplify publish`

fix #7486

* test(cli): add tests for hasCdBranches

* refactor(cli): mockBranches explicit values set per-test
cjihrig added a commit that referenced this pull request Aug 26, 2021
This was causing E2E test failures.

Refs: #7874

Co-authored-by: Colin Ihrig <colihrig@amazon.com>
@github-actions
Copy link

github-actions bot commented Sep 2, 2021

👋 Hi, this pull request was referenced in the v5.4.0 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v5.4.0.

@github-actions github-actions bot added the referenced-in-release Issues referenced in a published release changelog label Sep 2, 2021
jhockett pushed a commit that referenced this pull request Sep 7, 2021
… configured in Amplify Console (#7874) (#8106)

* Revert "fix: handle case where there is no appId (#8049)"

This reverts commit f7e62df.

The commit being reverted builds on top of another commit that
is being reverted.

* Revert "fix(cli): better error message when trying to publish with CD configured in Amplify Console (#7874)"

This reverts commit 4f03859.

The commit being reverted causes a number of customer bug reports
in verion 5.4.0.

Co-authored-by: Colin Ihrig <colihrig@amazon.com>
@github-actions
Copy link

github-actions bot commented Sep 9, 2021

👋 Hi, this pull request was referenced in the v5.5.0 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v5.5.0.

marcvberg pushed a commit to marcvberg/amplify-cli that referenced this pull request Oct 13, 2021
…red in Amplify Console (aws-amplify#7874)

* fix(cli): add specific check for cd branches when running `amplify publish`

fix aws-amplify#7486

* test(cli): add tests for hasCdBranches

* refactor(cli): mockBranches explicit values set per-test
marcvberg pushed a commit to marcvberg/amplify-cli that referenced this pull request Oct 13, 2021
This was causing E2E test failures.

Refs: aws-amplify#7874

Co-authored-by: Colin Ihrig <colihrig@amazon.com>
marcvberg pushed a commit to marcvberg/amplify-cli that referenced this pull request Oct 13, 2021
… configured in Amplify Console (aws-amplify#7874) (aws-amplify#8106)

* Revert "fix: handle case where there is no appId (aws-amplify#8049)"

This reverts commit f7e62df.

The commit being reverted builds on top of another commit that
is being reverted.

* Revert "fix(cli): better error message when trying to publish with CD configured in Amplify Console (aws-amplify#7874)"

This reverts commit 4f03859.

The commit being reverted causes a number of customer bug reports
in verion 5.4.0.

Co-authored-by: Colin Ihrig <colihrig@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
referenced-in-release Issues referenced in a published release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amplify headless environment creation
2 participants