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

Ensure the namespaces filtering is respected in packages.config package installation/updates in PMC #4150

Merged
merged 4 commits into from
Jul 17, 2021

Conversation

erdembayar
Copy link
Contributor

@erdembayar erdembayar commented Jul 12, 2021

Bug

Fixes: NuGet/Home#11001

Regression? Last working version: N/A

Description

This change ensuring that the namespaces are respected during package installation in PMC. If there is same package Id exist in 2 repositories then it only request it from one it specified in namespace filter, previously we try to fetch from all possible repositories and install one from fastest which may not be what user really wanted.

This PR is continuation of #4140.

Please note: init.ps1 is might not respect package namespace filtering, because technically any powershell command could be inside it and it can do pretty much anything including direct downloading assets from web.

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@erdembayar erdembayar force-pushed the dev-eryondon-NameSpacePackageConfig-InstallUpdatePMC branch from 4acc7a4 to 7409945 Compare July 12, 2021 23:46
@erdembayar erdembayar force-pushed the dev-eryondon-NameSpacePackageConfig-InstallUpdatePMC branch from 7409945 to 3a4223d Compare July 16, 2021 20:53
@erdembayar erdembayar force-pushed the dev-eryondon-NameSpacePackageConfig-InstallUpdatePMC branch from 3a4223d to 072d6b8 Compare July 16, 2021 21:12
@erdembayar erdembayar marked this pull request as ready for review July 16, 2021 21:30
@erdembayar erdembayar requested a review from a team as a code owner July 16, 2021 21:30
Copy link
Member

@nkolev92 nkolev92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@@ -149,6 +154,17 @@ public static SimpleTestPackageContext CreatePackage(string packageName, string
return package;
}

public static SimpleTestPackageContext CreateCustomPackage(string packageName, string packageVersion, string requestAdditionalContent)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: CustomPackage is not a super descriptive name. A better name would call out what it's compatible with.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refactored it and rename to CreateNetCorePackage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure the namespaces filtering is respected in packages.config package installation/updates PMC
2 participants