Skip to content

Package-lock out of sync #1515

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

Closed
4 tasks done
mtrezza opened this issue Jul 22, 2022 · 11 comments · Fixed by #1546 or #1553
Closed
4 tasks done

Package-lock out of sync #1515

mtrezza opened this issue Jul 22, 2022 · 11 comments · Fixed by #1546 or #1553
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:ci CI related issue

Comments

@mtrezza
Copy link
Member

mtrezza commented Jul 22, 2022

New Issue Checklist

Issue Description

CI fails in various PRs with:

npm ERR! cipm can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.

Steps to reproduce

See https://github.com/parse-community/Parse-SDK-JS/runs/7474143947?check_suite_focus=true

Actual Outcome

Tests fail

Expected Outcome

Tests pass

Environment

Current alpha

n/a

Logs

n/a

@parse-github-assistant
Copy link

parse-github-assistant bot commented Jul 22, 2022

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@mtrezza mtrezza added the type:ci CI related issue label Jul 22, 2022
@mtrezza mtrezza pinned this issue Jul 22, 2022
@mtrezza mtrezza linked a pull request Jul 22, 2022 that will close this issue
2 tasks
@mtrezza
Copy link
Member Author

mtrezza commented Jul 22, 2022

@parse-community/js-sdk could someone take a look at this? The tests started to fail since recently. Regenerating the package-lock file repeatedly produces the following 3 failing tests:

1) Dirty Objects tracks dirty arrays
- Failed: 1 == 2
2) Dirty Objects tracks dirty objects
- Unhandled promise rejection: AssertionError [ERR_ASSERTION]: 1 == 2
3) Dirty Objects tracks dirty geo points
- Unhandled promise rejection: AssertionError [ERR_ASSERTION]: 5 == 10

See https://github.com/parse-community/Parse-SDK-JS/runs/7474143947?check_suite_focus=true

This could be an issue in the Parse JS SDK, but it may as well be an issue in the current Parse Server alpha branch, which is the branch that is used to run the Parse JS SDK tests.

@dblythy
Copy link
Member

dblythy commented Jul 26, 2022

I really can't work out why these tests are failing due to a new package-lock.

The failing tests allow Parse Object to set updated objects without having to call .save (tracks in memory).

    const geo = new Parse.GeoPoint(5, 5);
    const object = new TestObject();
    object.set('location', geo);
    await object.save()
    geo.latitude = 10;
    // do not have to call .set again
    await object.save();
    const query = new Parse.Query(TestObject);
    const o = await query.get(object.id);
    assert.equal(o.get('location').latitude, 10);

Not sure which dependancy would cause this.

Any ideas?

@mtrezza
Copy link
Member Author

mtrezza commented Jul 26, 2022

I really can't work out why these tests are failing due to a new package-lock.

I don't think the tests are failing due to the regenerated package-lock. It seems that resolving the package-lock issue only uncovered the failing tests.

@mtrezza
Copy link
Member Author

mtrezza commented Jul 27, 2022

You could either debug-step through the tests (do they pass locally and only fail remotely?), to investigate why they fail. Or you could just to back in the commit history to find the last commit where the tests pass, then look at the difference to the next commit.

@dblythy
Copy link
Member

dblythy commented Sep 8, 2022

Is this still an issue @mtrezza?

@mtrezza
Copy link
Member Author

mtrezza commented Sep 8, 2022

Yes, it is. I wasn't able to track this down. To replicate this:

  1. fork alpha
  2. delete package-lock.json
  3. run npm i

The CI should then fail.

That may be related to the fact that synk and dependabot manipulate the package-lock file and we are now in a state where the current (manipulated) file is significant differently than the file when recreated. So we are now going with the current manipulated file and doing releases, but we should be able to recreate package-lock file at any point in time and have the CI pass.

@dblythy
Copy link
Member

dblythy commented Sep 10, 2022

After some tedious investigation, It seems like the issue is caused by Parse Server. CI is currently locked to the latest version, yet npm i causes it to fetch alpha.

It seems like the commit that causes the failure is here.

The PR that should fix this issue is here

@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.0-alpha.4

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Sep 21, 2022
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Oct 25, 2022
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 3.5.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version type:ci CI related issue
Projects
None yet
3 participants