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(app): do not cache graphql #18716

Merged
merged 3 commits into from
Nov 1, 2021

Conversation

lmiller1990
Copy link
Contributor

@lmiller1990 lmiller1990 commented Nov 1, 2021

Fix a bug where the specs of the previous project are shown due to caching.

How to reproduce:

  1. Open a project using global mode
  2. Go to vite URL, specs tab
  3. Go back to launchpad and choose another project
  4. Go to vite URL, spec tab
  5. Specs from previous project are shown due to cached graphql client

Not sure if there's a better way (eg some way to bust the cache when we change to a project). If there is, please suggest it and I'll update the PR.

@lmiller1990 lmiller1990 marked this pull request as ready for review November 1, 2021 08:25
@cypress
Copy link

cypress bot commented Nov 1, 2021



Test summary

18565 4 216 7Flakiness 2


Run details

Project cypress
Status Failed
Commit de8f8ac
Started Nov 1, 2021 1:27 PM
Ended Nov 1, 2021 1:47 PM
Duration 20:17 💡
OS Linux Debian - 10.9
Browser Multiple

View run in Cypress Dashboard ➡️


Failures

Run group: 5x-driver-electron (Linux, Electron )
commands/navigation_spec.js Failed
1 ... > throws when qs is false
commands/waiting_spec.js Failed
1 ... > invalid 1st argument > throws when 1st arg is Function
Run group: 5x-driver-chrome (Linux, Chrome )
e2e/redirects_spec.js Failed
1 redirection > meta > binds to the new page after a timeout
Run group: 2x-desktop-gui (Linux, Electron )
settings_spec.js Failed
1 Settings > file preference panel > loads preferred editor and available editors

Flakiness

cypress/integration/commands/net_stubbing_spec.ts Flakiness
1 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"
2 network stubbing > waiting and aliasing > can timeout waiting on a single request using "alias.request"

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

Copy link
Member

@tgriesser tgriesser left a comment

Choose a reason for hiding this comment

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

There's a resetClient method in GraphQLDataContext that I was thinking we'd use for invalidating the cache. Hadn't quite decided how/where it would be used yet though, and it's probably more trouble to manage than your approach, so let's just go with that.

Only comment is that if we're going to create a new class and it's not cached, let's make it a method.

packages/data-context/src/DataContextShell.ts Outdated Show resolved Hide resolved
packages/data-context/src/sources/HtmlDataSource.ts Outdated Show resolved Hide resolved
@tgriesser tgriesser self-requested a review November 1, 2021 13:04
Copy link
Member

@tgriesser tgriesser left a comment

Choose a reason for hiding this comment

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

Meant to click "request changes" on the last comment

Co-authored-by: Tim Griesser <tgriesser10@gmail.com>
@lmiller1990 lmiller1990 merged commit a064d1c into unified-desktop-gui Nov 1, 2021
@lmiller1990 lmiller1990 deleted the lmiller1990/do-not-cache-graphql branch November 1, 2021 13:22
tgriesser added a commit that referenced this pull request Nov 4, 2021
…ve-activeProject

* unified-desktop-gui: (57 commits)
  chore: Add e2e tests for global mode (#18719)
  chore: add percy to app and launchpad package (#18781)
  chore: update test
  refactor: move settings in app (#18729)
  feat: setup launchpad lifecycle (#18734)
  feat(app): decouple event manager from driver (#18695)
  chore: Force single resolution for core modules, infinite loop guard (#18764)
  fix(driver): Sticky elements within a fixed container will not prevent an element from being scrolled to (#18441)
  chore: cleaning up the runner container pattern (#18741)
  feat: Use .config files (#18578)
  chore(app): basic style and example to stop scrollIntoView bug (#18736)
  chore: make `create` function on server.ts obsolete (#18615)
  feat: add codegen utility (#18708)
  docs: Add instructions to squash commits to develop in Contributing (#18728)
  fix(@cypress/react): throw if using Next.js swc-loader without nodeVersion=system (#18686)
  refactor: remove Ramda (#18723)
  fix: support using create-cypress-tests as part of build process (#18714)
  chore: Increase paralleled machines for desktop-gui tests (#18725)
  fix(app): do not cache graphql (#18716)
  chore: Update Chrome (stable) to 95.0.4638.69 (#18696)
  ...
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

2 participants