Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix certain msstore source 404 failures by treating them as empty responses #5179

Merged
merged 4 commits into from
Feb 4, 2025

Conversation

yao-msft
Copy link
Contributor

@yao-msft yao-msft commented Feb 4, 2025

When searching for store source with id that's recently taken down, store source will return 404 instead of empty results (what winget-cli-restsource does). This will be treated as a source search error in our code. The fix is to treat 404 response with certain schema as empty result instead of failure.

Tested manually with store source and added unit tests.

fixes #4785, fixes #4784

Microsoft Reviewers: Open in CodeFlow

@yao-msft yao-msft requested a review from a team as a code owner February 4, 2025 06:15

This comment has been minimized.

This comment has been minimized.

@mdanish-kh
Copy link
Contributor

@yao-msft
Copy link
Contributor Author

yao-msft commented Feb 4, 2025

Does this resolve:

which subsequently should be the fix for

as well?

Yes. I'll link the issues. Thanks!

@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-External Issue outside of winget-cli source labels Feb 4, 2025
@yao-msft
Copy link
Contributor Author

yao-msft commented Feb 4, 2025

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Member

@JohnMcPMS JohnMcPMS left a comment

Choose a reason for hiding this comment

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

@yao-msft yao-msft merged commit 9c6d3b4 into microsoft:master Feb 4, 2025
9 checks passed
@yao-msft yao-msft deleted the 404empty branch February 4, 2025 20:53
JohnMcPMS pushed a commit that referenced this pull request Feb 5, 2025
…ponses (#5179)

When searching for store source with id that's recently taken down,
store source will return 404 instead of empty results (what
winget-cli-restsource does). This will be treated as a source search
error in our code. The fix is to treat 404 response with certain schema
as empty result instead of failure.

Tested manually with store source and added unit tests.

fixes #4785, fixes #4784
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Area-External Issue outside of winget-cli source Issue-Bug It either shouldn't be doing this or needs an investigation.
Projects
None yet
3 participants