Giter Site home page Giter Site logo

Bug - Fork Sync Issue about winget-create HOT 8 OPEN

PckgrBot avatar PckgrBot commented on May 25, 2024 3
Bug - Fork Sync Issue

from winget-create.

Comments (8)

mdanish-kh avatar mdanish-kh commented on May 25, 2024 1

@matifali You can take a look at PR https://www.github.com/microsoft/devhome/pull/2167/files (how the guys over at devhome are attempting to fix this)

from winget-create.

JanDeDobbeleer avatar JanDeDobbeleer commented on May 25, 2024

Same, this happens on latest. I have to delete the forked repo and then it works again only to fail on a next release.

from winget-create.

mdanish-kh avatar mdanish-kh commented on May 25, 2024

This looks related to:

The comment in the source code where syncing occurs explains the reason:

await retryPolicy.ExecuteAsync(async () =>
{
  // Related issue: https://github.com/microsoft/winget-create/issues/282
  // There is a known issue where a reference is unable to be created if the fork is behind by too many commits.
  // Always attempt to sync fork during first execution in order to mitigate the possibility of this scenario occurring.
  // If the fork is behind by too many commits, syncing will also fail with a NotFoundException.
  // Updating the fork can fail if it is a non-fast forward update, but this should not be blocking as pull request submission can still proceed.
  // If creating a reference fails, that means syncing the fork also failed, therefore the user will need to manually sync their repo regardless.
  if (!forkSyncAttempted && submitToFork)
  {
      forkSyncAttempted = true;
      await this.UpdateForkedRepoWithUpstreamCommits(repo);
  }

  await this.github.Git.Reference.Create(repo.Id, new NewReference($"refs/{newBranchNameHeads}", upstreamMasterSha));
});

Looking at how we can do things differently, I can only find this issue (which recommends the same method wingetcreate uses already) in the library's repo

I also doubt that it's only occurring on the latest version (1.5.7.0 currently) of wingetcreate, since there hasn't been any notable changes to the GitHub flow in this release 👀

from winget-create.

mdanish-kh avatar mdanish-kh commented on May 25, 2024

Can you try and get any logs when this occurs? You can use wingetcreate info command to see the logs directory

from winget-create.

JanDeDobbeleer avatar JanDeDobbeleer commented on May 25, 2024

@mdanish-kh this is running inside a GitHub runner so that won't be possible I'm afraid.

from winget-create.

matifali avatar matifali commented on May 25, 2024

Are there any recommendations or steps we can follow to fix this?

Ideally it should not happen.

from winget-create.

vedantmgoyal9 avatar vedantmgoyal9 commented on May 25, 2024

This seems to be a more cleaner solution, as no configuration is required - https://github.com/apps/pull

from winget-create.

rakleed avatar rakleed commented on May 25, 2024

@mdanish-kh I have the same problem, in case you still need logs.

Logs
2024-02-23 17:26:32.3262|TRACE|Microsoft.WingetCreateCLI.Program.Main|Command line args: C:\Program Files\WindowsApps\Microsoft.WindowsPackageManagerManifestCreator_1.6.1.0_x64__8wekyb3d8bbwe\WingetCreateCLI\WingetCreateCLI.dll new https://us.download.nvidia.com/nvapp/client/10.0.0.499/NVIDIA_app_beta_v10.0.0.499.exe
2024-02-23 17:26:32.4086|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.LoadGitHubClient|No token parameter, reading cached token
2024-02-23 17:26:32.4468|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.CheckGitHubTokenAndSetClient|Checking repo access using provided token
2024-02-23 17:26:33.0580|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.CheckGitHubTokenAndSetClient|Access check was successful, proceeding
2024-02-23 17:26:33.3359|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DownloadPackageFile|Downloading and parsing: https://us.download.nvidia.com/nvapp/client/10.0.0.499/NVIDIA_app_beta_v10.0.0.499.exe...
2024-02-23 17:26:45.9422|INFO|Microsoft.WingetCreateCLI.Commands.NewCommand+<Execute>d__15.MoveNext|For information about the restrictions for each field, visit https://aka.ms/winget-manifest-schema
2024-02-23 17:26:45.9434|DEBUG|Microsoft.WingetCreateCLI.Commands.NewCommand+<Execute>d__15.MoveNext|Please enter values for the following fields:
2024-02-23 17:27:00.1968|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [PackageVersion] set to the value [1.0.14.0]
2024-02-23 17:27:05.6928|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [DefaultLocale] set to the value [en-US]
2024-02-23 17:27:07.9730|DEBUG|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptInstallerProperties|Additional metadata needed for installer from https://us.download.nvidia.com/nvapp/client/10.0.0.499/NVIDIA_app_beta_v10.0.0.499.exe
2024-02-23 17:41:48.5954|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [Publisher] set to the value [NVIDIA Corporation]
2024-02-23 17:41:49.2968|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [PackageName] set to the value [NVIDIA app]
2024-02-23 17:41:55.7283|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [License] set to the value [Proprietary]
2024-02-23 17:42:00.5710|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [ShortDescription] set to the value [NVIDIA app]
2024-02-23 17:42:04.2180|DEBUG|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Generating a preview of your manifests...
2024-02-23 17:42:04.2180|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Version manifest preview:
2024-02-23 17:42:04.2848|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Installer manifest preview:
2024-02-23 17:42:04.2956|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Default locale manifest preview:
2024-02-23 17:42:04.3483|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.ValidateManifest|Manifest validation succeeded: True
2024-02-23 17:42:23.0236|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [PackageVersion] set to the value [1.0.14.0]
2024-02-23 17:42:23.9335|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [DefaultLocale] set to the value [en-US]
2024-02-23 17:42:30.0717|DEBUG|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptInstallerProperties|Additional metadata needed for installer from https://us.download.nvidia.com/nvapp/client/10.0.0.499/NVIDIA_app_beta_v10.0.0.499.exe
2024-02-23 17:42:35.6865|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [Publisher] set to the value [NVIDIA Corporation]
2024-02-23 17:42:36.2595|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [PackageName] set to the value [NVIDIA app]
2024-02-23 17:42:36.9722|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [License] set to the value [Proprietary]
2024-02-23 17:42:37.4217|TRACE|Microsoft.WingetCreateCLI.Commands.NewCommand.PromptRequiredProperties|Property [ShortDescription] set to the value [NVIDIA app]
2024-02-23 17:42:39.5921|DEBUG|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Generating a preview of your manifests...
2024-02-23 17:42:39.5921|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Version manifest preview:
2024-02-23 17:42:39.6013|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Installer manifest preview:
2024-02-23 17:42:39.6142|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.DisplayManifestPreview|Default locale manifest preview:
2024-02-23 17:42:39.6467|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.ValidateManifest|Manifest validation succeeded: True
2024-02-23 17:42:42.3094|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.SaveManifestDirToLocalPath|Manifest saved to %USERPROFILE%\manifests\n\Nvidia\NvidiaApp\Beta\1.0.14.0
2024-02-23 17:42:45.0147|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.CheckGitHubTokenAndSetClient|Checking repo access using provided token
2024-02-23 17:42:45.4197|TRACE|Microsoft.WingetCreateCLI.Commands.BaseCommand.CheckGitHubTokenAndSetClient|Access check was successful, proceeding
2024-02-23 17:42:45.4197|INFO|Microsoft.WingetCreateCLI.Commands.BaseCommand.GitHubSubmitManifests|Submitting pull request for manifest...
2024-02-23 17:42:53.8397|ERROR|Microsoft.WingetCreateCLI.Commands.BaseCommand.GitHubSubmitManifests|Unable to create a reference to the forked repository. This can be caused when the forked repository is behind by too many commits. Sync your fork and try again.

from winget-create.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.