Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update package registration logic #49566

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

Merged

Conversation

mariam-abdulla
Copy link
Member

@mariam-abdulla mariam-abdulla commented Jun 26, 2025

This pull request refines the logic for recording package registrations in the RecordPackages method of DotnetNewTestTemplatesTests.cs. The changes ensure that package registrations are uniquely identified by both name and version, and remove code for updating versions of existing registrations.

Enhancements to package registration logic:

Closes #48607

@Copilot Copilot AI review requested due to automatic review settings June 26, 2025 07:39
@mariam-abdulla mariam-abdulla requested a review from a team as a code owner June 26, 2025 07:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refines the package registration logic in the RecordPackages method, ensuring that registrations are uniquely identified by both package name and version while removing the code that updated package versions.

  • Updated the registration lookup to require a matching version in addition to the package name
  • Removed the branch that updated the package version, enforcing immutability of registered package versions
Comments suppressed due to low confidence (2)

test/dotnet-new.IntegrationTests/DotnetNewTestTemplatesTests.cs:284

  • Ensure the comment fully reflects the new behavior that both package name and version are used to identify an existing registration, minimizing any potential confusion.
                    // Find existing registration for this package with the SAME VERSION

test/dotnet-new.IntegrationTests/DotnetNewTestTemplatesTests.cs:307

  • Consider adding or updating unit tests to verify that registrations with the same package name but different versions are handled as distinct entries, given the removal of version updating logic.
                    }

@mariam-abdulla mariam-abdulla merged commit d1b5a81 into main Jun 26, 2025
27 checks passed
@mariam-abdulla mariam-abdulla deleted the dev/mabdullah/update-package-registration-logic branch June 26, 2025 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ensure templates are built via a pipeline to support CG
2 participants