Skip to content

Fix #14576: Add updatePackageLastAccessTime to valid config keys list - #6809

Merged
nkolev92 merged 2 commits into
devfrom
copilot/fix-7766fa09-c72a-4d06-88c2-cd8b844ce6e5
Oct 2, 2025
Merged

nkolev92 merged 2 commits into
devfrom
copilot/fix-7766fa09-c72a-4d06-88c2-cd8b844ce6e5

Conversation

Copilot AI commented Sep 30, 2025 •

Copy link
Copy Markdown
Contributor

Bug

Fixes: NuGet/Home#14576

Description

The updatePackageLastAccessTime configuration setting was added in PR #4222, but it was not included in the list of valid config keys returned by ConfigurationConstants.GetConfigKeys(). This caused dotnet nuget config set updatePackageLastAccessTime true to fail with the error: 'updatePackageLastAccessTime' is not a valid config key in config section.

Changes:

  1. Added UpdatePackageLastAccessTime to the list returned by ConfigurationConstants.GetConfigKeys() in ConfigurationContants.cs
  2. Added test case [InlineData("updatePackageLastAccessTime", "true")] to XPlatConfigTests.ConfigSetCommand_WithConfigFileArg_AddsSetting to verify the config key can be set successfully

This minimal fix enables users to successfully run:

dotnet nuget config set updatePackageLastAccessTime true

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

Copilot AI changed the title [WIP] Fix Fix @NuGet/Home/issues/14576 Fix #14576: Add updatePackageLastAccessTime to valid config keys list Sep 30, 2025
Copilot AI requested a review from nkolev92 September 30, 2025 17:33
@nkolev92

Copy link
Copy Markdown
Member

@copilot write-up a pull request description following the https://github.com/NuGet/NuGet.Client/blob/dev/.github/PULL_REQUEST_TEMPLATE.md template and paste it as a comment..

Copilot AI commented Sep 30, 2025 •

Copy link
Copy Markdown
Contributor Author

@copilot write-up a pull request description following the https://github.com/NuGet/NuGet.Client/blob/dev/.github/PULL_REQUEST_TEMPLATE.md template and paste it as a comment..

Here's the PR description following the template:


Bug

Fixes: NuGet/Home#14576

Description

The updatePackageLastAccessTime configuration setting was added in PR #4222, but it was not included in the list of valid config keys returned by ConfigurationConstants.GetConfigKeys(). This caused dotnet nuget config set updatePackageLastAccessTime true to fail with the error: 'updatePackageLastAccessTime' is not a valid config key in config section.

Changes:

  1. Added UpdatePackageLastAccessTime to the list returned by ConfigurationConstants.GetConfigKeys() in ConfigurationContants.cs
  2. Added test case [InlineData("updatePackageLastAccessTime", "true")] to XPlatConfigTests.ConfigSetCommand_WithConfigFileArg_AddsSetting to verify the config key can be set successfully

This minimal fix enables users to successfully run:

dotnet nuget config set updatePackageLastAccessTime true

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

Copilot AI requested a review from nkolev92 September 30, 2025 19:34
@nkolev92
nkolev92 marked this pull request as ready for review September 30, 2025 20:24
@nkolev92
nkolev92 requested a review from a team as a code owner September 30, 2025 20:24
@nkolev92
nkolev92 requested a review from jeffkl September 30, 2025 20:24
@nkolev92
nkolev92 enabled auto-merge (squash) October 1, 2025 16:57
@nkolev92
nkolev92 requested a review from Nigusu-Allehu October 2, 2025 18:41
@nkolev92

nkolev92 commented Oct 2, 2025

Copy link
Copy Markdown
Member

For some reason the auto rotation did nothing, so I just assign an extra person.

@nkolev92
nkolev92 merged commit e82b123 into dev Oct 2, 2025
18 checks passed
@nkolev92
nkolev92 deleted the copilot/fix-7766fa09-c72a-4d06-88c2-cd8b844ce6e5 branch October 2, 2025 21:03
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.

Cannot set updatePackageLastAccessTime config via dotnet nuget config set

4 participants