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

chore(app-shell-odd): update electron builder config #14600

Merged
merged 10 commits into from
Mar 19, 2024

Conversation

koji
Copy link
Contributor

@koji koji commented Mar 5, 2024

Overview

Update electron in builder config file.

Test Plan

Changelog

Review requests

Risk assessment

low

update electron version info in build config file
@koji koji requested a review from a team March 5, 2024 14:50
@koji koji changed the base branch from edge to chore_release-7.2.0 March 5, 2024 14:50
@koji koji requested review from akshay-dighe and removed request for akshay-dighe March 5, 2024 14:50
@koji koji marked this pull request as ready for review March 5, 2024 14:51
@koji koji requested a review from a team as a code owner March 5, 2024 14:51
@koji koji requested review from mjhuff and removed request for a team March 5, 2024 14:51
Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.48%. Comparing base (be34672) to head (4a86047).
Report is 105 commits behind head on edge.

❗ Current head 4a86047 differs from pull request most recent head 341beec. Consider uploading reports for the commit 341beec to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #14600      +/-   ##
==========================================
- Coverage   67.57%   67.48%   -0.10%     
==========================================
  Files        2521     2493      -28     
  Lines       72237    71363     -874     
  Branches     9306     9096     -210     
==========================================
- Hits        48816    48159     -657     
+ Misses      21226    21053     -173     
+ Partials     2195     2151      -44     
Flag Coverage Δ
g-code-testing 92.43% <ø> (ø)
hardware 57.22% <ø> (-0.33%) ⬇️
hardware-testing ∅ <ø> (∅)
shared-data 75.94% <ø> (+0.62%) ⬆️
update-server 50.56% <ø> (ø)
usb-bridge 76.94% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
api/src/opentrons/commands/commands.py 95.45% <ø> (ø)
api/src/opentrons/commands/helpers.py 85.00% <ø> (ø)
api/src/opentrons/commands/types.py 100.00% <ø> (ø)
api/src/opentrons/hardware_control/api.py 82.33% <ø> (ø)
...entrons/hardware_control/backends/ot3controller.py 68.48% <ø> (ø)
...pentrons/hardware_control/backends/ot3simulator.py 86.23% <ø> (ø)
...i/src/opentrons/hardware_control/modules/update.py 27.69% <ø> (-1.10%) ⬇️
api/src/opentrons/hardware_control/ot3api.py 79.62% <ø> (ø)
...ardware_control/protocols/instrument_configurer.py 63.15% <ø> (ø)
api/src/opentrons/hardware_control/types.py 96.55% <ø> (ø)
... and 48 more

... and 36 files with indirect coverage changes


module.exports = {
appId: 'com.opentrons.odd',
electronVersion: '23.3.13',
electronVersion: app.getVersion(),
Copy link
Member

Choose a reason for hiding this comment

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

i dont think this is quite right: this will get the version of the app, not electron: https://www.electronjs.org/docs/latest/api/app#appgetversion

i think we want to import our package.json directly:

import pkg from './package.json'

module.exports = {
...
  electronVersion: JSON.stringify(pkg.devDependencies.electron),
}

Copy link
Member

@shlokamin shlokamin left a comment

Choose a reason for hiding this comment

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

lgtm but lets put this in edge instead of the the release branch to minimize variables since they want to release ASAP

also maybe lets wait to merge this into edge until the vite branch is merged?

@koji koji added the DO NOT MERGE Indicates a PR should not be merged, even if there's a shiny green merge button available label Mar 5, 2024
@sfoster1 sfoster1 added DO NOT MERGE Indicates a PR should not be merged, even if there's a shiny green merge button available and removed DO NOT MERGE Indicates a PR should not be merged, even if there's a shiny green merge button available labels Mar 6, 2024
@sfoster1
Copy link
Member

sfoster1 commented Mar 8, 2024

Corresponding openembedded branch: Opentrons/oe-core#137

update electron version info in build config file
Copy link
Collaborator

@y3rsh y3rsh left a comment

Choose a reason for hiding this comment

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

Along with this would we also want to dynamically define electron version in /app-shell/Makefile ? Not sure off the top of my head if that is easy to do in a reliable way.
https://github.com/Opentrons/opentrons/blob/release/app-shell/Makefile#L62

@koji koji requested review from a team as code owners March 8, 2024 21:18
@koji koji changed the base branch from chore_release-7.2.0 to edge March 9, 2024 00:14
@sfoster1
Copy link
Member

With this build https://github.com/Opentrons/oe-core/actions/runs/8238878130 of the oe-core PR and with putting all the built in solibs in, the app doesn't haeve a crash and all its processes are running but is still not displaying

We used to show mainWindow on the ready-to-show event. For some reason
that's just not happening anymore, but everything underneath is actually
working fine. Instead, we can show when we get the first dispatch from
the app side. This may lead to us spending more time on the pre-app
splash and less tim on the spinner.
@sfoster1
Copy link
Member

Latest commit alters init behavior. Build with it is here https://github.com/Opentrons/oe-core/actions/runs/8332543203

That openembedded PR will definitely be needed because it also now adds a command line flag that tells chrome to allow all-origin requests for devtools websockets.

@sfoster1
Copy link
Member

Along with this would we also want to dynamically define electron version in /app-shell/Makefile ? Not sure off the top of my head if that is easy to do in a reliable way. https://github.com/Opentrons/opentrons/blob/release/app-shell/Makefile#L62

I'm just noting this and uhhhhhhhhhhh what

@sfoster1
Copy link
Member

Along with this would we also want to dynamically define electron version in /app-shell/Makefile ? Not sure off the top of my head if that is easy to do in a reliable way. https://github.com/Opentrons/opentrons/blob/release/app-shell/Makefile#L62

OK, had some time to think about this. I think that we should, but maybe in a follow up pr, and honestly I think the most reliable thing to do is use jq.

I think we do not want to do this for the ODD. There, we just accept that the version might be different than the desktop.

@sfoster1 sfoster1 removed the DO NOT MERGE Indicates a PR should not be merged, even if there's a shiny green merge button available label Mar 19, 2024
sfoster1 added a commit to Opentrons/oe-core that referenced this pull request Mar 19, 2024
Branch for OE changes to support Opentrons/opentrons#14600

Adds a new command line flag to enable remote devtool access on electron 27 and switches out some libraries.
@sfoster1 sfoster1 merged commit d370ba8 into edge Mar 19, 2024
20 checks passed
@sfoster1 sfoster1 deleted the chore_update-electron-builder-config branch March 19, 2024 16:53
Carlos-fernandez pushed a commit that referenced this pull request May 20, 2024
Update the ODD to use electron 27.

slightly changes the app's initialization flow in ODD; we now `show()` after the first dispatch from the app side, since `ready-to-show` isn't firing.
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.

4 participants