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

[PackageType]Reflowing packages with package types cause the records to be duplicated #7780

Closed
joelverhagen opened this issue Dec 18, 2019 · 2 comments

Comments

@joelverhagen
Copy link
Member

@joelverhagen joelverhagen commented Dec 18, 2019

image

There should only be one.

@joelverhagen joelverhagen changed the title Reflowing packages with package types cause the records to be duplicated [PackageType]Reflowing packages with package types cause the records to be duplicated Dec 18, 2019
joelverhagen added a commit that referenced this issue Dec 18, 2019
Clear previous package types during reflow: #7780
Reject invalid package type names: #7766
joelverhagen added a commit that referenced this issue Dec 18, 2019
Clear previous package types during reflow: #7780
Reject invalid package type names: #7766
@joelverhagen joelverhagen self-assigned this Dec 19, 2019
@joelverhagen joelverhagen added this to the S163 - 2019.12.09 milestone Dec 19, 2019
@joelverhagen

This comment has been minimized.

Copy link
Member Author

@joelverhagen joelverhagen commented Dec 19, 2019

There are 219 packages on PROD with duplicate package types. This query can be used to find them. After this change ships to PROD gallery we can just reflow these packages:

SELECT MAX(pr.Id) AS Id, MAX(p.NormalizedVersion) AS NormalizedVersion, MAX(p.[Key]) AS PackageKey, pt.[Name], COUNT(*) AS [Count]
FROM PackageTypes pt
INNER JOIN Packages p ON pt.PackageKey = p.[Key]
INNER JOIN PackageRegistrations pr ON pr.[Key] = p.PackageRegistrationKey
GROUP BY p.[Key], pt.[Name]
HAVING COUNT(*) > 1
ORDER BY MAX(pr.Id), MAX(p.NormalizedVersion)
@joelverhagen

This comment has been minimized.

Copy link
Member Author

@joelverhagen joelverhagen commented Jan 9, 2020

Verified and fixed all affected packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.