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: handle cloud error/no internet error #21526

Merged
merged 38 commits into from
Jun 14, 2022

Conversation

estrada9166
Copy link
Member

@estrada9166 estrada9166 commented May 16, 2022

User facing changelog

Additional details

Currently, we were not handling some cloud errors - with these changes we now prevent any mutation from org creation/project creation if there's no internet connection; also we are handling the gql requests as a global error - this may change to render the mutation errors as an alert inside the component (waiting for some designs updates) - This is a starting point for some more upcoming changes

No access to org

image

Internal server error

image

No internet connection

image

image

How has the user experience changed?

PR Tasks

  • Have tests been added/updated?
  • Has the original issue (or this PR, if no issue exists) been tagged with a release in ZenHub? (user-facing changes only)
  • Has a PR for user-facing changes been opened in cypress-documentation?
  • Have API changes been updated in the type definitions?
  • Have new configuration options been added to the cypress.schema.json?

@cypress-bot
Copy link
Contributor

cypress-bot bot commented May 16, 2022

Thanks for taking the time to open a PR!

@cypress
Copy link

cypress bot commented May 16, 2022



Test summary

4874 0 61 0Flakiness 0


Run details

Project cypress
Status Passed
Commit 81c9d56
Started Jun 14, 2022 4:42 PM
Ended Jun 14, 2022 4:57 PM
Duration 14:08 💡
OS Linux Debian - 10.11
Browser Firefox 98

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@estrada9166 estrada9166 marked this pull request as ready for review May 17, 2022 19:20
@estrada9166 estrada9166 marked this pull request as draft May 18, 2022 14:10
@MuazOthman MuazOthman self-requested a review May 18, 2022 15:47
estrada9166 and others added 5 commits May 18, 2022 10:47
* fix: update gql error handler

* Add failing test

* Fix test

* Update with code review

* Update with code review

* Update packages/data-context/src/sources/CloudDataSource.ts

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
@estrada9166 estrada9166 marked this pull request as ready for review May 19, 2022 01:03
@marktnoonan
Copy link
Contributor

Hey @estrada9166 let me know if I am testing correctly, or maybe something is not in the staging dashboard yet that would support the test?: https://www.loom.com/share/d38c9da77d1940a7aabb422cdea19349

In the video I could not trigger the state in your first screenshot. I was able to add a project after having been removed from the org. I had to log out and log back in to reach this state on the runs page. Until then I saw the regular connect/create project stuff and appeared to still be in the organization.

Screen Shot 2022-05-24 at 9 04 46 PM

@estrada9166 estrada9166 changed the base branch from 10.0-release to develop May 25, 2022 14:01
Copy link
Contributor

@marktnoonan marktnoonan left a comment

Choose a reason for hiding this comment

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

Retesting everything today it works fine, not sure what happened yesterday, possibly I was logged in with the wrong credentials at some part? Anyhoo here is a video of it working correctly. If anybody else is looking for steps to test this manually, that video shows what I was doing to test.

Non-blocking suggestion, let's not show this X in the Unauthorized error, since it's not dismissable:

Screen Shot 2022-05-26 at 12 05 03 PM

Or we could make it dismissable I guess, to let users clear it and retry and see that the same error has happened.

@tgriesser tgriesser changed the title feat: handle cloud error/no internet error fix: handle cloud error/no internet error Jun 14, 2022
@jennifer-shehane
Copy link
Member

@estrada9166 Any followup on this PR?

@estrada9166
Copy link
Member Author

@jennifer-shehane we should be ready to merge after CI pass!

@estrada9166 estrada9166 merged commit 2a27697 into develop Jun 14, 2022
@estrada9166 estrada9166 deleted the alejandro/feat/handle-cloud-errors branch June 14, 2022 18:28
tgriesser added a commit that referenced this pull request Jun 14, 2022
* develop:
  fix: handle cloud error/no internet error (#21526)
BeijiYang pushed a commit to BeijiYang/cypress that referenced this pull request Jun 23, 2022
* feat: handle cloud error/no internet error

* Update error handling

* Add tests

* Fix TS

* Revert change

* fix: update gql error handler (cypress-io#21542)

* fix: update gql error handler

* Add failing test

* Fix test

* Update with code review

* Update with code review

* Update packages/data-context/src/sources/CloudDataSource.ts

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>

* Add tests

* Prevent showing toaster

* Upodate with feedback

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
Co-authored-by: Mark Noonan <mark@cypress.io>
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