microsoft / microsoft/winget-cli

Rest source update issue

Open
#3,852 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-Source Issue-Bug
Dominant language
C++
Stars
26.4k
Forks
1.8k
Avg merge
1d 11h
Merged PRs (30d)
15

Description

Brief description of your issue

Even though source is not avaiable currently, winget reports update done.

Steps to reproduce
  • Add custome rest source winget source add -n rest-source -t "Microsoft.Rest" -a https://winget.example.com/
  • update the source
  • Turn down the app running rest source
  • update the source
Expected behavior

Update the source, report if it encounter the error

Actual behavior

Reporting success message but in fact it was not.

Source list
$ winget source list
Name    Argument
-----------------------------------------------------
puvvadi https://winget.local.puvvadi.net/wg/
msstore https://storeedgefd.dsx.mp.microsoft.com/v9.0
winget  https://cdn.winget.microsoft.com/cache
Winget source update
$ winget source update
Updating all sources...
Updating source: puvvadi...
Done
Updating source: msstore...
Done
Updating source: winget...
Done
connection test
Invoke-RestMethod -Uri https://winget.local.puvvadi.net/wg/
Invoke-RestMethod: No such host is known.
Winget log
2023-11-04 14:02:07.041 [CORE] WinGet, version [1.6.2771], activity [{50BC38BD-7E81-4F8B-A1E2-2EDAF20C49A1}]
2023-11-04 14:02:07.041 [CORE] OS: Windows.Desktop v10.0.22621.2428
2023-11-04 14:02:07.041 [CORE] Command line Args: "C:\Users\kd\AppData\Local\Microsoft\WindowsApps\winget.exe" source update
2023-11-04 14:02:07.041 [CORE] Package: Microsoft.DesktopAppInstaller v1.21.2771.0
2023-11-04 14:02:07.041 [CORE] IsCOMCall:0; Caller: winget-cli
2023-11-04 14:02:07.053 [CLI ] WinGet invoked with arguments: 'source' 'update'
2023-11-04 14:02:07.053 [CLI ] Found subcommand: source
2023-11-04 14:02:07.053 [CLI ] Found subcommand: update
2023-11-04 14:02:07.053 [CLI ] Leaf command to execute: root:source:update
2023-11-04 14:02:07.053 [CLI ] Executing command: update
2023-11-04 14:02:07.090 [REPO] Named source requested, found: puvvadi
2023-11-04 14:02:07.092 [REPO] Named source to be updated, found: puvvadi
2023-11-04 14:02:07.197 [REPO] Named source requested, found: msstore
2023-11-04 14:02:07.203 [REPO] Named source to be updated, found: msstore
2023-11-04 14:02:07.304 [REPO] Named source requested, found: winget
2023-11-04 14:02:07.307 [REPO] Named source to be updated, found: winget
2023-11-04 14:02:07.329 [CORE] Examining extension: PFN = Microsoft.Winget.Source_8wekyb3d8bbwe, ID = IndexDB
2023-11-04 14:02:07.329 [CORE] Found matching extension.
2023-11-04 14:02:07.662 [CLI ] Leaf command succeeded: root:source:update
Rest source /information end point

{
  "Data": {
    "ServerSupportedVersions": [
      "1.4.0",
      "1.5.0"
    ],
    "SourceIdentifier": "puvvadi"
  }
}
Environment
Windows Package Manager v1.6.2771
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22621.2428
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.21.2771.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing winget source update with a custom Microsoft.Rest source, then inspect the source-update path using the provided log and /information response. Confirm that stopping the REST service produces an error instead of Done; the issue is complete when the failure is reported for the unavailable source.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, powershell
Domain
cli, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.