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): make shell remote check lazier to avoid spurious assertions #3895

Merged
merged 2 commits into from
Aug 20, 2019

Conversation

mcous
Copy link
Contributor

@mcous mcous commented Aug 19, 2019

overview

In investigating @IanLondon's reports of a circular-dependency based assertion, I found that the root of the problem was an assertion firing for a missing remote during import (i.e. before the code was actually running).

I'm not 100% sure of the Electron and/or webpack mechanics that are allowing that assertion to be hit, but moving the assertion to property access time fixes the issue.

@IanLondon: app/src/protocol/selectors.js creates a logger (via app/src/protocol/protocol-data.js), which relies on the remote module to send logs over to the desktop shell to save to a file. Rebasing #3891 over this branch fixed the issues for me.

changelog

  • fix(app): make shell remote check lazier to avoid spurious assertions

review requests

@mcous mcous added bug app Affects the `app` project ready for review fix PR fixes a bug labels Aug 19, 2019
@mcous mcous requested a review from IanLondon August 19, 2019 22:56
@codecov
Copy link

codecov bot commented Aug 19, 2019

Codecov Report

Merging #3895 into edge will increase coverage by 22.88%.
The diff coverage is 25%.

Impacted file tree graph

@@             Coverage Diff             @@
##             edge    #3895       +/-   ##
===========================================
+ Coverage   34.65%   57.53%   +22.88%     
===========================================
  Files         731      819       +88     
  Lines       11630    23259    +11629     
===========================================
+ Hits         4030    13382     +9352     
- Misses       7600     9877     +2277
Impacted Files Coverage Δ
app/src/shell/remote.js 0% <0%> (ø) ⬆️
app/src/shell/index.js 70.58% <100%> (-4.42%) ⬇️
opentrons/data_storage/database_queries.py 100% <0%> (ø)
opentrons/legacy_api/containers/placeable.py 93.94% <0%> (ø)
opentrons/drivers/utils.py 72.72% <0%> (ø)
opentrons/protocol_api/execute.py 68.29% <0%> (ø)
opentrons/hardware_control/modules/mod_abc.py 75% <0%> (ø)
opentrons/hardware_control/controller.py 59.54% <0%> (ø)
opentrons/legacy_api/instruments/pipette.py 94.96% <0%> (ø)
opentrons/api/models.py 85.18% <0%> (ø)
... and 80 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd604e2...8a0ed3f. Read the comment docs.

Copy link
Contributor

@IanLondon IanLondon left a comment

Choose a reason for hiding this comment

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

😎 💥

@mcous mcous merged commit 7aaad6d into edge Aug 20, 2019
@mcous mcous deleted the app_lazier-remote-proxy branch August 20, 2019 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app Affects the `app` project bug fix PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants