Skip to content
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

fix(manager:nuget): use git to read current lockfile #15395

Merged
merged 3 commits into from May 20, 2022
Merged

Conversation

viceice
Copy link
Member

@viceice viceice commented May 2, 2022

Changes

Read current lockfile from git, so we detect changes when multiple restore commands are run.
Currently the second restore causes a reset of previous run.

Context

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@viceice viceice requested a review from rarkins May 2, 2022 07:27
@viceice
Copy link
Member Author

viceice commented May 2, 2022

@rarkins rarkins requested a review from JamieMagee May 2, 2022 09:55
@viceice
Copy link
Member Author

viceice commented May 18, 2022

@rarkins @JamieMagee This will block lockfiule usage on nuget manager, so please review.

@rarkins
Copy link
Collaborator

rarkins commented May 19, 2022

I'm a bit lost. Could anyone summarize it simply?

@viceice
Copy link
Member Author

viceice commented May 19, 2022

I'm a bit lost. Could anyone summarize it simply?

Scenario:

  • We have 3 project files, a,b,c and b,c depend on a.
  • Renovate updates same dep in all projects
  • Renovate runs update artifacts on all projects
    • project a run: reads current lockfile, updates lockfile for all projects, because of detected transitive dep, returns all changed lockfiles
    • project b run: reads changed lockfiles, rund restore for a and b, returns only b lockfile, as a didn't change in this run (this overwrites the previous returned lickfile result)
    • project c run: like b, returns on c lockfile
  • renovate drops a lockfile from changes

So for correclty change detection we now read the lockfile from git and compare with current files, so all changes files are returned.

@rarkins
Copy link
Collaborator

rarkins commented May 20, 2022

So when you write:

This will block lockfiule usage on nuget manager, so please review.

Do you mean it's currently blocked, and your PR fixes it? Or this PR blocks something?

@viceice
Copy link
Member Author

viceice commented May 20, 2022

So when you write:

This will block lockfiule usage on nuget manager, so please review.

Do you mean it's currently blocked, and your PR fixes it? Or this PR blocks something?

This will block lockfile usage, see #15390

@viceice viceice enabled auto-merge (squash) May 20, 2022 04:30
@viceice viceice merged commit 5afed40 into main May 20, 2022
@viceice viceice deleted the fix/nuget-lockfiles branch May 20, 2022 04:40
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 32.64.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NuGet manager does not consider previously updated lockfiles
4 participants