Skip to content

Enable GraphQL file upload tests for Node >16 #7978

Closed
@mtrezza

Description

@mtrezza

New Issue Checklist

Issue Description

Some GraphQL file tests needed to be disabled for Node >=17 to bring Parse Server forward for Node 17 / 18 compatibility, see #7896 (comment).

Disabled tests:

it('should support files', async () => {

it('should return File object', async () => {

The node-fetch package became incompatible with its use in GraphQL Parse Server in Node 17/18. Either there is a fix, or node-fetch needs to be replaced with another package.

Going back and using old version of node-fetch 2.x is not an attractive option; the upgrade to 3.x was done previously by dependabot due to a security vulnerability. Even though it's a dev dependency, in a CI/CD pipeline outdated packages can be a security risk, depending on the type of vulnerability. It may also impact Parse Server's vulnerability score, as devDependencies may not always be excluded from that calculation. In addition, we'll keep getting automatic upgrade PRs for node-fetch from dependabot and Snky if we go back to 2.x.

The tests currently run on Node <17; since the Node 16 LTS end date is Apr 2024, we are at least keeping an eye on the tests until then, although we are not running them for Node >16.

Suggested solution:

  • Run the tests only for Node <17 for now
  • Do not run the tests on Node 17, which is an odd-intermediate version where LTS ends 2022-06 anyway
  • Over time (until Node 16 LTS end Apr 2024), create a PR to run the tests on Node 18 using Node's built-in fetch

Steps to reproduce

n/a

Actual Outcome

Tests are disabled.

Expected Outcome

Tests should be enabled.

Environment

n/a

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:ciCI related issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions