filter `IsLatestVersion` returns invalid response for package `Microsoft.PowerShell.PSResourceGet`
還沒有人認領這個 Issue。
評估
研究方向
Start by tracing the NuGet v2 API handling for FindPackagesById() and the IsLatestVersion filter, comparing the reported request with and without a leading space. Reproduce the response for Microsoft.PowerShell.PSResourceGet and inspect the code and tests that build the feed XML. Done means the API returns one package entry for the filtered package ID, with valid feed structure.
由索引模型根據 Issue 內容生成。
描述
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest version
- Search the existing issues.
Steps to reproduce
- Call
FindPackagesById()for packageJiraPSvia the PSGallery NuGet v2 API - example API call:https://www.powershellgallery.com/api/v2/FindPackagesById()?id=%27JiraPS%27&$filter=IsLatestVersion - Repeat the same API call for package
Microsoft.PowerShell.PSResourceGet- example call:https://www.powershellgallery.com/api/v2/FindPackagesById()?id=%27Microsoft.PowerShell.PSResourceGet%27&$filter=IsLatestVersion - Repeat the same API call for package
Microsoft.PowerShell.PSResourceGet, but this time add a space to the front of the filter string:https://www.powershellgallery.com/api/v2/FindPackagesById()?id=%27Microsoft.PowerShell.PSResourceGet%27&$filter=%20IsLatestVersion
Expected behavior
All 3 API calls return one and only one package (with the latest version) for their respective package IDs
Actual behavior
API call #2 returns invalid NuGet XML response, but calls 1 and 3 work as expected
Error details
N/A
Environment data
N/A
Version
N/A
Visuals
XML response from API call number 2 is:
<?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">
<m:count>1</m:count>
<id>http://schemas.datacontract.org/2004/07/</id>
<title/>
<updated>2024-05-15T01:39:20Z</updated>
<link rel="self"
href="https://www.powershellgallery.com/api/v2/Packages"/>
<author>
<name/>
</author>
</feed>
Of particular interest is:
<m:count>1</m:count>suggests one<entry>should be present, but there are none.<author>should be under an<entry>, not the<feed>. (It's also null for some reason?)
- 主要語言
- PowerShell
- 星號
- 289
- 分支
- 83
- 平均合併
- 1 分鐘
- 30 天內合併 PR
- 1
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
PowerShell/PowerShellGallery 的其他 Issue
-
難度 4/5 3-5 天 新手友好度 38/100
PowerShell/PowerShellGallery#357 · 3 則留言 · 4 個 reaction ·
-
難度 2/5 1-3 小時 新手友好度 48/100
PowerShell/PowerShellGallery#355 ·
-
難度 4/5 3-5 天 新手友好度 31/100
PowerShell/PowerShellGallery#354 · 1 則留言 · 3 個 reaction ·
-
難度 5/5 一週以上 新手友好度 35/100
PowerShell/PowerShellGallery#353 · 5 個 reaction ·
-
難度 4/5 3-5 天 新手友好度 48/100
PowerShell/PowerShellGallery#350 · 7 則留言 · 8 個 reaction ·
查看 PowerShell/PowerShellGallery 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 84/100
pingdotgg/t3code#30228 · 2 則留言 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 82/100
jejjohnson/gaussx#719 ·
維護者通常 1 天內回覆
-
bug
難度 2/5 1-3 小時 新手友好度 77/100
canonical/temporal-worker-k8s-operator#135 · 1 則留言 ·
維護者通常 2 天內回覆
-
難度 2/5 1-3 小時 新手友好度 75/100
維護者通常 1 天內回覆
-
5.0.x backport enhancement
難度 2/5 1-3 小時 新手友好度 63/100
spring-cloud/spring-cloud-function#1507 ·
維護者通常 1 天內回覆