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

WIP: Upgrade electron to latest version #3569

Open
wants to merge 144 commits into
base: v5.0
from

Conversation

@chrisbreiding
Copy link
Collaborator

commented Feb 22, 2019

Closes #3568

@chrisbreiding chrisbreiding referenced this pull request Feb 22, 2019

Open

Cypress v5.0 #2840

19 of 34 tasks complete

@chrisbreiding chrisbreiding changed the base branch from develop to v4.0 Feb 22, 2019

Show resolved Hide resolved .node-version Outdated
@Saibamen
Copy link
Contributor

left a comment

Also please update this line: https://github.com/cypress-io/cypress/blob/develop/appveyor.yml#L10
and change comment to Test against the latest version of this Node.js version

Show resolved Hide resolved .node-version Outdated

chrisbreiding added some commits Apr 2, 2019

@chrisbreiding chrisbreiding changed the title WIP: Upgrade electron to 4.0.5 WIP: Upgrade electron to latest versoin Apr 5, 2019

@chrisbreiding chrisbreiding changed the title WIP: Upgrade electron to latest versoin WIP: Upgrade electron to latest version Apr 5, 2019

bahmutov and others added some commits May 13, 2019

chore(deps): Update dependency decaffeinate to version .x 🌟 (#4190)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
@Joelasaur

This comment has been minimized.

Copy link

commented May 14, 2019

Looks like the electron upgrade is breaking a bunch of stuff. It's now May; is there any update for this feature or 4.0 in general? I need this issue resolved in order to adopt Cypress into our webpack configuration for typescript support.

@bahmutov This is keeping me from using typescript in our project, perhaps mention it in your blog post?

flotwig and others added some commits May 15, 2019

Retry certain requests on failure (#4015)
* retry requests, basic e2e test

* basic e2e test for chrome behavior

* don't use timeouts to test

* some minor cleanup

* validate google chrome's retry behavior w/ a proxy

* get retries on network errors workin

* cleanup

* final changes before switching approach

* Reverting previous approach in request.coffee, server.coffee

* add retryOnNetworkFailure

* now works with retryOnStatusCodeFailure

* retry 4 times in addition to the 1 initial attempt

* add tests for subresources

* much improved error handling

* have the e2e test really work

* e2e baseurl check

* retry baseurl check

* remove special handling for node 8.2.1 bug

* WIP: continue making progress building out request retry

- swap out passthrough’s for pumpify / duplexify / pump
- clean up error handling / messaging / retry logic

* pipe clientrequest events

* buffer req body to disk, restore error handling/retrying

* don't bubble up errors from failed attempts

* actually pipe reqstream, oops

* add some e2e tests for request body

* revert lib/request.coffee to 7be1051

* add almost-working lazy-stream

* manually fire the 'pipe' event on the reqStream to copy headers to the outgoing message

- restore the ‘error’ propagation so that all tests pass for now

* cleanup leaking 'undefined' into stdout, causing failing e2e tests

- do not set onWarning as a property of project, just pass as an
argument

* add new options to request_spec, deduplicate default opts

* use stream buffer in request.coffee

* revert request.coffee

* last stream_buffer changes before removing fs stuff

* remove fs stuff from stream_buffer, add stream piping tests

* it works! 🎉🎉🎉 using duplexify to separate delayStream and reqBodyBuffer

* retry for .5s max on ECONNREFUSED

* add error codes

* don't timeout proxied requests

* restore baseurl check

* update new e2e tests

* make delay work with rp

* propagate clientresponse events

* removing tests that don't do anything now that we don't ESOCKETTIMEOUT on proxied requests

* add new visit, req options to index.d.ts

* don't fail on server-performance-test

* make retries with status code work again

* account for different stack trace in ci

* fix test

* retry https requests

* add tests for https passthru retries working

* clean up error handling for https-proxy

* fix failing https-proxy tests, tweak agent error handling to prevent multiple callbacks

* make expectedExitCode actual vs. expected in the correct order

* bump up e2e test timeout so it can retry and still work

* update tests

* retry up to 500ms on proxied requests

* add tests for incompatible options errors

* remove .only

* maybe this will help it act more consistently

* help e2e test work in ci

* don't reconnect on already made connections

* clarify naming

* wip: testing https proxy

* better debug calls

* WIP: getting proxy passthrough retry tests going

* handle retrying upstream proxy errors

- add tests for successfully retrying proxy errors and for unsuccessful
retries
- fix onClose errors when proxy connection is closed before enough data
is received
- fix not returning setTimeout correctly

* group related code accordingly

* do not build typescript by default, drop extension from main

* more TODO notes

* don't set a default NO_PROXY if NO_PROXY = ''

* debugging-proxy@2.0.0

* null out reqBodyBuffer when req finishes

* wip: retry in agent, not https-proxy [skip-ci]

* update https-proxy to use @packages/network retries

* retry after connection but before proxy tunnel established

* appease my linty overlords

* update https-proxy tests

* update agent specs, decided to still use tls.connect

it's easier to test and has less complexity

* test retrying HTTPS passthru

* debugging-proxy@2.0.1

* increase defaultCommandTimeout 100 -> 200 to prevent flake in CI

* auto formatting

* fix test to be dynamic and not rely on magic constants

* copy types field when linking proxy images, update packages/network types field

* linting

* add network index.js file

* linting

* improve error messaging experience when verifying base url

* only insert 1 new line

* fix failing test not binding to localhost

* removed test that's covered by e2e specs

* remove dash in 're-try'

* some cleanup for readability

* use allocUnsafe per perf

* unset NO_PROXY with an empty string

* move retry ensuring the baseUrl into url, cleanup some imperative code

* if the head is already present during connect, make connection, else wait for first head bytes

* minor formatting, clarity around conditions, naming

* rename retryInterval -> retryIntervals

* set defaults for requests during creation for clarity

* rename send -> sendPromise to pair better with sendStream

* use retryIntervals instead of juggling MAX_REQUEST_RETRIES

- ensure debug messages are consistent between request streams +
promises
- set static constants

* DRY up status check + network failure + retry logic

- keeps the debug logic identical between promises + streams
- ensures all logic paths are also consistent
- consolidates the pop’ing of intervals in a single place

* find / replace fail

* derp

* make the logic actually correct, set intervals as cloned defaults for recursive lookup

* pass arg correctly

* reduce debugging noise, formatting

* rename intervals -> delaysRemaining for clarity

* added unit tests around getDelayForRetry

* set retryIntervals as default options correctly, add unit tests


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Co-authored-by: Gleb Bahmutov <gleb.bahmutov@gmail.com>
Escape paths passed by `--browser` (#4011)
* add failing test

* launcher: escape path to browser in getVersionString

* fix test

* Use execa.stdout so we can just pass the path as-is, no escaping
chore(deps): update dependency ts-node to version .x 🌟 (major) (#4197)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Expose `cy.isCy` as `Cypress.isCy`, add typedefs (#4170)
* expose cy.isCy on Cypress object

* add typedefs for Cypress.isCy

* :face_palm:
Fix typos in selector-playground.spec.jsx ("Oop" > "Oops") (#4201)
* Clarifies error when focused element not found

Fixes #851 -> Updates Error Message for Clarity when unable to find a focused element

* Revert change to error message

* Fix typos ("Oop" > "Oops")
Update Cypress.log to throw when not provided an obj + handle being c…
…alled outside of command (#4159)

* Update Cypress.log to throw when not provided an object as its argument

* Add failing e2e test for Cypress.log being used without a cy command

* Write code to handle situation when log is run outside of a command

- add snapshot for passing situation

* have options be obj by default

* Replace end to end test with unit integration test

* Fix issue where if Cypress.Log is not passed a name, then the Command component wouldn't render

* remove excess whitespace
fix(deps): Update dependency pluralize to version .x 🌟 (#4205)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
fix(deps): update dependency semver to version .x 🌟 (#4207)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
fix(deps): update dependency getos to version .x 🌟 (#4222)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
fix(deps): update dependency method-override to version .x 🌟 (#4209)
* fix(deps): update method-override to 3.0.0 🌟

* remove unused method-override devDep from driver

* oh, where is my mind, I got these backwards. Remove from server - leave in driver 😑


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
Don't send Cypress error HTML on network errors (#4105)
* retry requests, basic e2e test

* basic e2e test for chrome behavior

* don't use timeouts to test

* some minor cleanup

* validate google chrome's retry behavior w/ a proxy

* get retries on network errors workin

* cleanup

* final changes before switching approach

* Reverting previous approach in request.coffee, server.coffee

* add retryOnNetworkFailure

* now works with retryOnStatusCodeFailure

* retry 4 times in addition to the 1 initial attempt

* add tests for subresources

* much improved error handling

* have the e2e test really work

* e2e baseurl check

* retry baseurl check

* remove special handling for node 8.2.1 bug

* WIP: continue making progress building out request retry

- swap out passthrough’s for pumpify / duplexify / pump
- clean up error handling / messaging / retry logic

* pipe clientrequest events

* buffer req body to disk, restore error handling/retrying

* don't bubble up errors from failed attempts

* actually pipe reqstream, oops

* add some e2e tests for request body

* revert lib/request.coffee to 7be1051

* add almost-working lazy-stream

* manually fire the 'pipe' event on the reqStream to copy headers to the outgoing message

- restore the ‘error’ propagation so that all tests pass for now

* cleanup leaking 'undefined' into stdout, causing failing e2e tests

- do not set onWarning as a property of project, just pass as an
argument

* add new options to request_spec, deduplicate default opts

* use stream buffer in request.coffee

* revert request.coffee

* last stream_buffer changes before removing fs stuff

* remove fs stuff from stream_buffer, add stream piping tests

* it works! 🎉🎉🎉 using duplexify to separate delayStream and reqBodyBuffer

* retry for .5s max on ECONNREFUSED

* add error codes

* don't timeout proxied requests

* restore baseurl check

* update new e2e tests

* make delay work with rp

* propagate clientresponse events

* removing tests that don't do anything now that we don't ESOCKETTIMEOUT on proxied requests

* add new visit, req options to index.d.ts

* don't fail on server-performance-test

* make retries with status code work again

* account for different stack trace in ci

* fix test

* retry https requests

* add tests for https passthru retries working

* clean up error handling for https-proxy

* fix failing https-proxy tests, tweak agent error handling to prevent multiple callbacks

* make expectedExitCode actual vs. expected in the correct order

* bump up e2e test timeout so it can retry and still work

* don't show cypress error page on network errors, gzip errors

* update tests

* clean up onWarning code

* add tests for incompatible options errors

* retry up to 500ms on proxied requests

* remove .only

* add tests for incompatible options errors

* remove .only

* maybe this will help it act more consistently

* help e2e test work in ci

* don't re-pipe the gzip response to client, the response is already gone

In the event that a gzip response has an error and we're not doing full injecting (ie, not buffering the response in memory), we can't just re-stream it.

By the time we do the second .pipe, the stream is already empty.

So, let's just error out anyways, which is what the browser would do (error).

* remove test for injecting into net error 500 pages in iframes

* update visit spec to expect an actual error, not Cypress HTML on visit timeouts

* update el snapshot

* don't reconnect on already made connections

* clarify naming

* wip: testing https proxy

* better debug calls

* WIP: getting proxy passthrough retry tests going

* handle retrying upstream proxy errors

- add tests for successfully retrying proxy errors and for unsuccessful
retries
- fix onClose errors when proxy connection is closed before enough data
is received
- fix not returning setTimeout correctly

* group related code accordingly

* do not build typescript by default, drop extension from main

* more TODO notes

* don't set a default NO_PROXY if NO_PROXY = ''

* debugging-proxy@2.0.0

* null out reqBodyBuffer when req finishes

* wip: retry in agent, not https-proxy [skip-ci]

* update https-proxy to use @packages/network retries

* retry after connection but before proxy tunnel established

* appease my linty overlords

* update https-proxy tests

* update agent specs, decided to still use tls.connect

it's easier to test and has less complexity

* test retrying HTTPS passthru

* debugging-proxy@2.0.1

* increase defaultCommandTimeout 100 -> 200 to prevent flake in CI

* auto formatting

* fix test to be dynamic and not rely on magic constants

* copy types field when linking proxy images, update packages/network types field

* linting

* add network index.js file

* linting

* improve error messaging experience when verifying base url

* only insert 1 new line

* fix failing test not binding to localhost

* removed test that's covered by e2e specs

* remove dash in 're-try'

* some cleanup for readability

* use allocUnsafe per perf

* unset NO_PROXY with an empty string

* move retry ensuring the baseUrl into url, cleanup some imperative code

* if the head is already present during connect, make connection, else wait for first head bytes

* minor formatting, clarity around conditions, naming

* rename retryInterval -> retryIntervals

* set defaults for requests during creation for clarity

* rename send -> sendPromise to pair better with sendStream

* use retryIntervals instead of juggling MAX_REQUEST_RETRIES

- ensure debug messages are consistent between request streams +
promises
- set static constants

* DRY up status check + network failure + retry logic

- keeps the debug logic identical between promises + streams
- ensures all logic paths are also consistent
- consolidates the pop’ing of intervals in a single place

* find / replace fail

* derp

* make the logic actually correct, set intervals as cloned defaults for recursive lookup

* pass arg correctly

* reduce debugging noise, formatting

* rename intervals -> delaysRemaining for clarity

* added unit tests around getDelayForRetry

* set retryIntervals as default options correctly, add unit tests

* using single line when debugging objects

* restore snapshot to match develop

* restore snapshot and move failing tests in e2e visit around momentarily...

* WIP: add the failing tests back in

* add tests for promise/stream that we don't retry on timeouts but do retry on resets

* use create entrypoint for tests

* pass requestTimeout from cy.visit(), remove hard coded request timeout

* s/requestTimeout/responseTimeout

* clean up how we initiate the request stream

* buffer resolve:url response before resolving promise

* only persist the buffer to memory once response finishes

* update visit spec to fail with ESOCKETTIMEDOUT

* use stream.PassThrough to buffer the response stream

* always buffer response stream

* de-commit those screenshots

* buffer forever - node's default is only to buffer 16kB

* some cleanup and renaming vars

* re-remove screenshots

* do all resolution login in on(end)

* update test to call the sendRequest callback

* update comment

* enable resolving:url to cancel currently in flight promises and abort pending requests

* add test for only having one request in flight at a time

* test currentPromisePhase too

* make tests fast again™️

* cleanup the coffeescript conversion, use common-tags, and use res.end to write final chunk

* add test ensuring that responseTimeout is passed correctly when resolving the url via cy.visit()

* micro-opt to check if err.code is property of zlib.constants

* always destroy the request socket when gzip fails as opposed to forwarding the broken bytes

* cleanup, formatting


Co-authored-by: Brian Mann <brian.mann86@gmail.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>
chore(deps): update dependency lint-staged to version .x 🌟 (#4223)
* chore(deps): update lint-staged to 7.3.0 🌟

* update lint-staged call to new syntax (they removed implicit npm script call)


Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Jennifer Shehane <jennifer@cypress.io>

@jennifer-shehane jennifer-shehane changed the base branch from v4.0 to v5.0 May 17, 2019

renovate bot and others added some commits May 17, 2019

chore(deps): update dependency husky to version .x 🌟 (#4228)

Co-authored-by: Renovate Bot <bot@renovateapp.com>
improve CLI verify + run display warnings (#4230)
* tighten up potential xvfb display problems

- improve the warning message on possible display problems
- reuse existing helper functions for platform detection
- instead of relying on timing mechanisms, if a possible display
problem is detected on linux - capture all of the stderr silently and
if the broken gtk message is detected, retry running

* consolidated and simplified smoke testing, xvfb error logging and messaging

- added —dev support to cypress verify cli command

* fix lots of tests, restore one error message

* fixed remaining CLI tests

* console.log pong only in electron mode

* remove dead code
update Test Runner to handle API errs for non-private test limits (#4025
)

* update Test Runner to handle API errs for non-private test limits

* update record errors to factor in private vs regular tests

- manually reconcile and update all snapshots —______________—


Co-authored-by: Brian Mann <brian.mann86@gmail.com>

@chrisbreiding chrisbreiding referenced this pull request May 21, 2019

Open

Cypress v4.0 #4270

10 of 22 tasks complete
@baer95

This comment has been minimized.

Copy link

commented May 21, 2019

From the recent changes in the v4 and v5 milestone issues it looks like the electron upgrade is planned to be merged for v4, but the merge target for this PR is still v5.0.

For which cypress release is the electron upgrade really planned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.