API - Get with `$select=Tags` does not return tags for some packages where `<d:Tags xml:space="preserve">`
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- Meio dia
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Estagnada
- Stack de tecnologia
- powershell, xml
- Domínio
- api
Direção de pesquisa
Start by tracing the API v2 Packages query handling for $select=Tags and how the Tags property is serialized, using the Trackyon.Utils and Az.Accounts responses in the issue as the comparison. Reproduce the query with both packages and inspect the relevant tests or add a regression case for tags containing xml:space="preserve". Done means $select=Tags returns the tag value for both packages.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
Example package is Trackyon.Utils.
If you do a get with no $select, tags are returned.
Request URL: https://www.powershellgallery.com/api/v2/Packages()?$filter=Id+eq+%27Trackyon.Utils%27+and+IsLatestVersion+and+not+IsPrerelease
Results
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://www.powershellgallery.com/api/v2" xmlns="http://www.w3.org/2005/Atom"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
xmlns:gml="http://www.opengis.net/gml">
<id>http://schemas.datacontract.org/2004/07/</id>
<title />
<updated>2025-01-13T08:34:49Z</updated>
<link rel="self" href="https://www.powershellgallery.com/api/v2/Packages" />
<entry>
<id>https://www.powershellgallery.com/api/v2/Packages(Id='Trackyon.Utils',Version='0.2.1')</id>
<category term="NuGetGallery.OData.V2FeedPackage"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://www.powershellgallery.com/api/v2/Packages(Id='Trackyon.Utils',Version='0.2.1')" />
<link rel="self" href="https://www.powershellgallery.com/api/v2/Packages(Id='Trackyon.Utils',Version='0.2.1')" />
<title type="text">Trackyon.Utils</title>
<updated>2025-01-13T08:30:01Z</updated>
<author>
<name>@DonovanBrown</name>
</author>
<content type="application/zip" src="https://www.powershellgallery.com/api/v2/package/Trackyon.Utils/0.2.1" />
<m:properties>
<d:Id>Trackyon.Utils</d:Id>
<d:Version>0.2.1</d:Version>
<d:NormalizedVersion>0.2.1</d:NormalizedVersion>
<d:Authors>@DonovanBrown</d:Authors>
<d:Copyright>(c) @DonovanBrown. All rights reserved.</d:Copyright>
<d:Created m:type="Edm.DateTime">2021-08-08T21:21:13.13</d:Created>
<d:Dependencies></d:Dependencies>
<d:Description>Useful functions for use from PowerShell</d:Description>
<d:DownloadCount m:type="Edm.Int32">2192180</d:DownloadCount>
<d:GalleryDetailsUrl>https://www.powershellgallery.com/packages/Trackyon.Utils/0.2.1</d:GalleryDetailsUrl>
<d:IconUrl m:null="true" />
<d:IsLatestVersion m:type="Edm.Boolean">true</d:IsLatestVersion>
<d:IsAbsoluteLatestVersion m:type="Edm.Boolean">true</d:IsAbsoluteLatestVersion>
<d:IsPrerelease m:type="Edm.Boolean">false</d:IsPrerelease>
<d:Language m:null="true" />
<d:LastUpdated m:type="Edm.DateTime">2025-01-13T08:30:01.647</d:LastUpdated>
<d:Published m:type="Edm.DateTime">2021-08-08T21:21:13.13</d:Published>
<d:PackageHash>kClO29g0o/z8bKGnjo9D2nLDcjrF8K34408Zb5ZPS3Kfrf9kCCz/dKKHcCcu3Q0QmKTk3V0eRw6TTgLBMvesZA==
</d:PackageHash>
<d:PackageHashAlgorithm>SHA512</d:PackageHashAlgorithm>
<d:PackageSize m:type="Edm.Int64">10890</d:PackageSize>
<d:ProjectUrl>http://DonovanBrown.com</d:ProjectUrl>
<d:ReportAbuseUrl>https://www.powershellgallery.com/packages/Trackyon.Utils/0.2.1/ReportAbuse</d:ReportAbuseUrl>
<d:ReleaseNotes m:null="true" />
<d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance>
<d:Summary m:null="true" />
<d:Tags xml:space="preserve"> PSFunction_Backup-Location PSCommand_Backup-Location PSFunction_Get-OperatingSystem
PSCommand_Get-OperatingSystem PSFunction_New-Directory PSCommand_New-Directory PSFunction_Set-As
PSCommand_Set-As PSFunction_Show-Browser PSCommand_Show-Browser PSFunction_Add-Item PSCommand_Add-Item
PSFunction_Enter-Location PSCommand_Enter-Location PSFunction_base64 PSCommand_base64 PSIncludes_Function
</d:Tags>
<d:Title m:null="true" />
<d:VersionDownloadCount m:type="Edm.Int32">1451041</d:VersionDownloadCount>
<d:MinClientVersion m:null="true" />
<d:LastEdited m:null="true" />
<d:LicenseUrl m:null="true" />
<d:LicenseNames m:null="true" />
<d:LicenseReportUrl m:null="true" />
<d:ItemType>Module</d:ItemType>
<d:FileList>
Trackyon.Utils.nuspec|README.md|Trackyon.Utils.psd1|Trackyon.Utils.psm1|en-US\about_Trackyon.Utils.help.txt|en-US\Trackyon.Utils-help.xml|Internal\Utils.ps1|Public\Add-Item.ps1|Public\Backup-Location.ps1|Public\base64.ps1|Public\Enter-Location.ps1|Public\Get-OperatingSystem.ps1|Public\New-Directory.ps1|Public\Set-As.ps1|Public\Show-Browser.ps1
</d:FileList>
<d:GUID>384ca328-1154-4b2e-9cde-5e8e3b874749</d:GUID>
<d:PowerShellVersion m:null="true" />
<d:PowerShellHostVersion m:null="true" />
<d:DotNetFrameworkVersion m:null="true" />
<d:CLRVersion m:null="true" />
<d:ProcessorArchitecture m:null="true" />
<d:CompanyName>Trackyon LLC</d:CompanyName>
<d:Owners>darquewarrior</d:Owners>
</m:properties>
</entry>
</feed>
But if you add $select=Tags, tags are not included.
Request URL: https://www.powershellgallery.com/api/v2/Packages()?$filter=Id+eq+%27Trackyon.Utils%27+and+IsLatestVersion+and+not+IsPrerelease&$select=Authors,Published,RequireLicenseAcceptance,Tags,Version
Results
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://www.powershellgallery.com/api/v2" xmlns="http://www.w3.org/2005/Atom"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
xmlns:gml="http://www.opengis.net/gml">
<id>http://schemas.datacontract.org/2004/07/</id>
<title />
<updated>2025-01-13T08:24:25Z</updated>
<link rel="self" href="https://www.powershellgallery.com/api/v2/Packages" />
<entry>
<id>https://www.powershellgallery.com/api/v2/Packages(Id='Trackyon.Utils',Version='0.2.1')</id>
<category term="NuGetGallery.OData.V2FeedPackage"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://www.powershellgallery.com/api/v2/Packages(Id='Trackyon.Utils',Version='0.2.1')" />
<link rel="self" href="https://www.powershellgallery.com/api/v2/Packages(Id='Trackyon.Utils',Version='0.2.1')" />
<title type="text">Trackyon.Utils</title>
<updated>2025-01-13T08:24:25Z</updated>
<author>
<name>@DonovanBrown</name>
</author>
<content type="application/zip" src="https://www.powershellgallery.com/api/v2/package/Trackyon.Utils/0.2.1" />
<m:properties>
<d:Authors>@DonovanBrown</d:Authors>
<d:Published m:type="Edm.DateTime">2021-08-08T21:21:13.13</d:Published>
<d:RequireLicenseAcceptance m:type="Edm.Boolean">false</d:RequireLicenseAcceptance>
<d:Tags></d:Tags>
<d:Version>0.2.1</d:Version>
</m:properties>
</entry>
</feed>
One difference I've noticed with Trackyon.Utils vs. other modules, say Az.Accounts: When tags are returned, the XML section starts with <d:Tags xml:space="preserve">.
Expected behavior
All packages with tags on PowerShell Gallery should include the value of the tags when $select=Tags
Same query, but with Az.Accounts. Request URL: https://www.powershellgallery.com/api/v2/Packages()?$filter=Id+eq+%27Az.Accounts%27+and+IsLatestVersion+and+not+IsPrerelease&$select=Authors,Published,RequireLicenseAcceptance,Tags,Version.
Results
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://www.powershellgallery.com/api/v2" xmlns="http://www.w3.org/2005/Atom"
xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"
xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss"
xmlns:gml="http://www.opengis.net/gml">
<id>http://schemas.datacontract.org/2004/07/</id>
<title />
<updated>2025-01-13T09:27:33Z</updated>
<link rel="self" href="https://www.powershellgallery.com/api/v2/Packages" />
<entry>
<id>https://www.powershellgallery.com/api/v2/Packages(Id='Az.Accounts',Version='4.0.0')</id>
<category term="NuGetGallery.OData.V2FeedPackage"
scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://www.powershellgallery.com/api/v2/Packages(Id='Az.Accounts',Version='4.0.0')" />
<link rel="self" href="https://www.powershellgallery.com/api/v2/Packages(Id='Az.Accounts',Version='4.0.0')" />
<title type="text">Az.Accounts</title>
<updated>2025-01-13T09:27:33Z</updated>
<author>
<name>Microsoft Corporation</name>
</author>
<content type="application/zip" src="https://www.powershellgallery.com/api/v2/package/Az.Accounts/4.0.0" />
<m:properties>
<d:Authors>Microsoft Corporation</d:Authors>
<d:Published m:type="Edm.DateTime">2024-11-19T05:04:35.383</d:Published>
<d:RequireLicenseAcceptance m:type="Edm.Boolean">true</d:RequireLicenseAcceptance>
<d:Tags>Azure ResourceManager ARM Accounts Authentication Environment Subscription PSModule PSEdition_Core
PSEdition_Desktop</d:Tags>
<d:Version>4.0.0</d:Version>
</m:properties>
</entry>
</feed>
Actual behavior
Some packages with tags on PowerShell Gallery does not include the value of the tags when $select=Tags
Error details
No response
Environment data
Not relevant
Version
Not relevant
Visuals
No response
- Linguagem predominante
- PowerShell
- Estrelas
- 289
- Forks
- 83
- Merge médio
- 1min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de PowerShell/PowerShellGallery
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 38/100
PowerShell/PowerShellGallery#357 · 3 comentários · 4 reações ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 48/100
PowerShell/PowerShellGallery#355 ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 31/100
PowerShell/PowerShellGallery#354 · 1 comentário · 3 reações ·
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
PowerShell/PowerShellGallery#353 · 5 reações ·
-
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
PowerShell/PowerShellGallery#350 · 7 comentários · 8 reações ·
Todas as issues de PowerShell/PowerShellGallery
Issues semelhantes
-
DBFS append mode silently overwrites existing filesTalvez já em andamento @IlyaKhalafi assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
fsspec/filesystem_spec#2429 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
volcengine/OpenViking#7014 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
fedora-copr/copr#4600 ·
Mantenedores costumam responder em até 2 dias
-
Routing rule or circuit breaker trip expression with an unknown CEL function hangs daprdTalvez já em andamento @RaphaelFakhri assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia