Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

update npm #900

Closed
aminya wants to merge 3 commits intoatom:masterfrom
atom-community:npm-update-4upstream
Closed

update npm #900
aminya wants to merge 3 commits intoatom:masterfrom
atom-community:npm-update-4upstream

Conversation

@aminya
Copy link
Copy Markdown
Contributor

@aminya aminya commented Aug 23, 2020

Description of the change

This updates npm to 6.14.8.

Related: atom-community/atom#102

Verification

The CI passes. npm versions are Node version agnostic, so it will work on Node version without changing the behavior.

This is tested on Atom too: atom-community/atom#103

Drawbacks

none

Release Notes

  • Update npm to 6.14.8

Closes #813

@aminya
Copy link
Copy Markdown
Contributor Author

aminya commented Aug 28, 2020

@sadick254 consider this as well. This solved the Linux issues for me.
atom/atom#21229

@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Aug 29, 2020

@aminya aminya force-pushed the npm-update-4upstream branch from 31132ae to 6239903 Compare September 5, 2020 10:49
@sadick254
Copy link
Copy Markdown
Contributor

@aminya and @DeeDeeG The linux build failure seem to have started after the electron upgrade atom/atom#21079. I have not yet been able to pin point the commit that caused the flakiness.

@aminya
Copy link
Copy Markdown
Contributor Author

aminya commented Sep 7, 2020

@sadick254 Here I did some research: atom-community/atom#88 (comment)

@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Sep 7, 2020

@sadick254 @aminya Another possible solution: During the Electron 6 PR, CI's Node version was set back, starting from Node 12.13.1 and downgrading to Node 12.40. Maybe this older Node has a bug that got fixed in newer Node 12.

I have collected lots of evidence (including many passing CI runs) that show the Node version in CI doesn't really matter very much. It can be Node 10 (10.12.0 or newer) or Node 12 (12.16 or older). I suggest we should try to use the latest Node 12.16 (12.16.3) or the latest Node 10 (something like 10.22.0). If the Linux build failure goes away for a week or more of CI runs, then I'd call it "probably fixed."

I can trial this at my personal fork if folks want more evidence to go off of.


Update: Here's the branch, I'll try to remember to push to it every time I notice upstream has updated. So I'll try to run this CI as often as upstream master updates, for a while.

Bonus: Doing this for the fork as well, just to collect some more CI runs.

@aminya
Copy link
Copy Markdown
Contributor Author

aminya commented Sep 7, 2020

This is a N-api issue. One of the Native modules (or Electron itself) does not use thread-safe promises. Using a Node version other than the one which Electron uses is not an appropriate solution to this (we have discussed this many times atom-community/atom#111).

For example: electron/electron#22843 fixed one missing handle scope in Electron 10, but this is not back ported to 6.

@DeeDeeG
Copy link
Copy Markdown
Contributor

DeeDeeG commented Sep 7, 2020

@aminya We have discussed many times and disagreed many times.

If I present a solution that works, that upstream is interested in, it is ultimately upstream's choice whether to go with it.

More evidence: Before the electron 6 PR, Node in CI did not match Electron's Node version. Only after they were put in sync did Linux builds start intermittently failing. Seriously, I'm not going to change my view on that. I'm not trying to re-hash that with you. I'm presenting an option to the upstream maintainers. They can choose.


Also: if upstream uses newer Node and you want to stay on Node 12.4.0 at our fork, then I have no problem with that. We can try to solve this from multiple angles at the same time.

@sadick254
Copy link
Copy Markdown
Contributor

@aminya and @DeeDeeG Thank you for all your pointers.

Using a Node version other than the one which Electron uses is not an appropriate solution for this.

My concern with this would be if the node module version of the newer node was different from what electron has. In this case its not. Node 12.4.0 and 12.18.3 both use NODE_MODULE_VERSION: 72. I have updated the node version on my personal fork and here are the results .

I am planning to run more builds just to make sure the issue does not resurface.

sadick254 added a commit to atom/atom that referenced this pull request Sep 9, 2020
We have been experiencing linux build failures on our CI.
This failure seem to be cause by
#21079.

Related conversation atom/apm#900
sadick254 added a commit to atom/atom that referenced this pull request Sep 9, 2020
We have been experiencing linux build failures on our CI.
This failure seem to be cause by
#21079.

Related conversation atom/apm#900
sadick254 added a commit to atom/atom that referenced this pull request Sep 9, 2020
We have been experiencing linux build failures on our CI.
This failure seem to be cause by
#21079.

Related conversation atom/apm#900
@aminya
Copy link
Copy Markdown
Contributor Author

aminya commented Oct 20, 2020

This is a notice for all Atom developers (@sadick254, @darangi, etc)

This week the version 7 of npm was released. It has some breaking changes. If you use npm@7 and run npm install, it will regenerate the package-lock.json. That means using apm ci (which uses the old package-lock system) on that new package-lock.json will not work. In other words, npm 7 is able to install the old package-lock.json not the other way around.

My suggestion is to merge this PR soon and update npm to npm@7 which supports both types of package-lock.json files

For now, make sure that you use npm@6:

npm i -g npm@6

@aminya aminya force-pushed the npm-update-4upstream branch from 6239903 to b493d47 Compare October 21, 2020 08:48
@aminya aminya force-pushed the npm-update-4upstream branch from b493d47 to 22ccff9 Compare October 21, 2020 09:01
@aminya aminya mentioned this pull request Dec 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants