Skip to content

Use Native Node fetch (when/if possible) #3071

@philrz

Description

@philrz

At first there was celebration when the changes in #3061 allowed us to drop the node-fetch dependency. Unfortunately we learned after the fact that the change caused intermittent CI failures as described in #3063. The fix for that problem came in #3069 where we switched over to using Electron's net.fetch in the app and going back to node-fetch elsewhere.

As described in #3063 (comment), evidence suggests that nodejs/undici#2026 might have been the root cause of the symptoms described in #3063, but the fix is only available in Node v21 and newer, and Electron's current latest release is still using Node v20, and based on prior history it looks like we're probably several months away from a release that will include a Node release new enough to include the fix.

This issue serves as a reminder for us to revisit the topic when a new Electron release is available to test with. The rough summary of the steps would be to create a branch where we:

  1. Back out the changes in Net Fetch in Electron #3069
  2. Put back the changes in Native Node Fetch #3061
  3. Do a looping test using the repro steps in e2e pool-load-success test hanging on close #3063 to confirm still we don't have hangs
  4. If that's all successful, merge that branch to main, which will once again achieve the goal of dropping node-fetch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions