betaflight-configurator icon indicating copy to clipboard operation
betaflight-configurator copied to clipboard

Update NWjs to 0.66.1 and Node to 16.16.0 LTS

Open haslinghuis opened this issue 2 years ago • 47 comments

https://nwjs.io/blog/v0.66.1/ https://github.com/nodejs/node/blob/main/doc/changelogs/CHANGELOG_V16.md#16.16.0

haslinghuis avatar May 20 '22 22:05 haslinghuis

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar May 20 '22 23:05 github-actions[bot]

AUTOMERGE: (FAIL)

  • github identifies PR as mergeable -> FAIL
  • assigned to a milestone -> FAIL
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> PASS
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> PASS
  • Tested label found -> FAIL
  • assigned to an approver -> PASS
  • approver count at least three -> PASS

blckmn avatar May 21 '22 01:05 blckmn

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar May 23 '22 12:05 github-actions[bot]

nwjs 0.63.x, 0.64.x, and 0.65.0 are producing faulty linux file rights from the packages. (i tested .deb).

0.62.2 is the last one to work.

The result is image

due to group and others rights are set none: image

instead of the expected read-only: image

meoso avatar May 31 '22 20:05 meoso

@meoso how about current version?

haslinghuis avatar May 31 '22 20:05 haslinghuis

@meoso how about current version?

master with nwjs 0.62.0 works fine. 0.63 breaks it

meoso avatar May 31 '22 20:05 meoso

@meoso Thanks. Let's wait for a newer version instead.

https://nwjs.io/blog/

haslinghuis avatar Jun 05 '22 20:06 haslinghuis

@haslinghuis I'm not too sure if we are a little off or I'm confusing some versions...

We use the .nvrmc file to define the Node version: https://github.com/betaflight/betaflight-configurator/blob/38688be1f817f80f952c5233625612c6dc550cf6/.nvmrc#L1 https://github.com/betaflight/betaflight-configurator/blob/38688be1f817f80f952c5233625612c6dc550cf6/package.json#L50-L52

But we ask for the 0.62 Node.js while building: https://github.com/betaflight/betaflight-configurator/blob/38688be1f817f80f952c5233625612c6dc550cf6/gulpfile.js#L50-L51

According to the log, since 0.59.1 the Node.js version is v17.3.0: https://nwjs.io/blog/v0.59.1/

So, maybe I'm confusing something, but I think we are not using the correct vesion? Or the backwards compatibility is assured?

McGiverGim avatar Jun 20 '22 07:06 McGiverGim

Agree we should solve it in tandem and should add Node.js v17.3.0 or perhaps even v18.3.0 if we add NWjs 0.65,1

See: https://github.com/nwjs/nw.js/blob/nw65/CHANGELOG.md

haslinghuis avatar Jun 20 '22 10:06 haslinghuis

@meoso please check?

haslinghuis avatar Jun 20 '22 14:06 haslinghuis

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 20 '22 14:06 github-actions[bot]

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 20 '22 14:06 github-actions[bot]

  • checked out 32e8edc
  • nvm install 18.3.0; nvm use 18.3.0; rm -rf node_modules ; yarn install
  • built release; installed release
  • user/executable rights do not apply correctly still for group & other image

Debian Linux 11 Linux 5.10.0-15-amd64 SMP Debian 5.10.120-1 (2022-06-09) x86_64 GNU/Linux

meoso avatar Jun 20 '22 15:06 meoso

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 20 '22 20:06 github-actions[bot]

Thanks @meoso for checking.

@McGiverGim Azure ubuntu-2204 uses Node 16.15.1 so even it runs locally we can't have (release) builds to match now working NW.js version with the suggested Node version.

https://github.com/actions/virtual-environments

haslinghuis avatar Jun 20 '22 21:06 haslinghuis

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 20 '22 21:06 github-actions[bot]

Maybe we can try to use this? https://github.com/actions/setup-node

McGiverGim avatar Jun 21 '22 06:06 McGiverGim

  • success with 711ea41!
  • installs proper and assigns correct rights
  • executes proper (did not test functionality) image

meoso avatar Jun 21 '22 13:06 meoso

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 21 '22 20:06 github-actions[bot]

@McGiverGim see second commit. But it doesn't work (linux locally works)

haslinghuis avatar Jun 21 '22 21:06 haslinghuis

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 21 '22 22:06 github-actions[bot]

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 21 '22 22:06 github-actions[bot]

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 22 '22 06:06 github-actions[bot]

@haslinghuis I'm not too sure, but I suspect the problem is only with Mac. It fails, and the others builds are cancelled (except the Android one that is faster). Do you have a way to test the Mac build in local?

McGiverGim avatar Jun 22 '22 06:06 McGiverGim

@haslinghuis seeing the error, is an error in mac-alias, that is a dependency of appdmg. We are using appdmg version 0.6.2. There is a 0.6.4 version available. Maybe you can try to update to this version to see if we have luck? https://github.com/betaflight/betaflight-configurator/blob/c8caa8f41ae679142c0139f5bcacd1196fd44ebf/package.json#L146

McGiverGim avatar Jun 23 '22 10:06 McGiverGim

@McGiverGim might need osx to add it:

[5/5] Building fresh packages...
Done in 21.99s.
mark@pc:~/dev/pr/update_nwjs/betaflight-configurator$ yarn add appdmg
yarn add v1.22.17
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
error [email protected]: The platform "linux" is incompatible with this module.
error Found incompatible module.

haslinghuis avatar Jun 23 '22 10:06 haslinghuis

Not really... you can change it manually in the package.json file: https://github.com/betaflight/betaflight-configurator/pull/2956

But I don't see changes in the different dependencies, so I think it will not work neither...

McGiverGim avatar Jun 23 '22 10:06 McGiverGim

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 23 '22 11:06 github-actions[bot]

this is how i did it elsewhere (avoids crashing linux/windows)

  "config": {
    "platformDependentModules": {
      "darwin": [
        "appdmg@^0.6.2"
      ]
    }
  }

it worked, it's in my project's master, but unsure how "correct" it is.

could also consider GH action to include

    strategy:
      fail-fast: false

to avoid canceling the other OS builds upon a single OS fail.

meoso avatar Jun 23 '22 13:06 meoso

Do you want to test this code? Here you have an automated build: Betaflight-Configurator-Android Betaflight-Configurator-Linux Betaflight-Configurator-macOS Betaflight-Configurator-Windows WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

github-actions[bot] avatar Jun 23 '22 19:06 github-actions[bot]