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

[Bug]: PackageSourceProvider.UpdatePackageSource does not enable a previously disabled source. #12008

Open
tg73 opened this issue Aug 8, 2022 · 2 comments
Assignees
Labels
Area:Settings NuGet.Config and related issues Category:Quality Week Issues that should be considered for quality week Functionality:SDK The NuGet client packages published to nuget.org Priority:2 Issues for the current backlog. Triage:NeedsMoreInfo Type:Bug

Comments

@tg73
Copy link

tg73 commented Aug 8, 2022

NuGet Product Used

NuGet SDK

Product Version

5.10.0

Worked before?

No response

Impact

It's more difficult to complete my work

Repro Steps & Context

In class NuGet.Configuration.PackageSourceProvider, the method:

public void UpdatePackageSource(PackageSource source, bool updateCredentials, bool updateEnabled)

does not apply the configuration changes required when source.IsEnabled is being updated from false to true (when updateEnabled is true, indicating that the update should be applied). I suspect that the problem is here:

disabledSourceItem = disabledSourcesSection?.GetFirstItemWithAttribute<AddItem>(ConfigurationConstants.KeyAttribute, sourceToUpdate.ElementName);

where sourceToUpdate.Key should be used as the last argument. Note that sourceToUpdate.ElementName is always the constant ConfigurationConstants.Add, which does not seem to be what's wanted here.

Verbose Logs

No response

@dominoFire dominoFire added Area:Settings NuGet.Config and related issues Functionality:SDK The NuGet client packages published to nuget.org and removed Triage:Untriaged labels Aug 11, 2022
@nkolev92
Copy link
Member

Team Triage: Assigning to check whether the PM UI might have the same potential issue.

@nkolev92 nkolev92 assigned zivkan and unassigned aortiz-msft Sep 8, 2022
@nkolev92
Copy link
Member

nkolev92 commented Sep 8, 2022

Team Triage: @zivkan we want to know if this is reproable and whether it impacts the product in any way.
The options UI does support enabling a disabled source, so we want to make sure that still works.

@nkolev92 nkolev92 added Category:Quality Week Issues that should be considered for quality week Priority:2 Issues for the current backlog. labels Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area:Settings NuGet.Config and related issues Category:Quality Week Issues that should be considered for quality week Functionality:SDK The NuGet client packages published to nuget.org Priority:2 Issues for the current backlog. Triage:NeedsMoreInfo Type:Bug
Projects
None yet
Development

No branches or pull requests

5 participants