GitTools / GitReleaseManager

Tool for creating and exporting releases for software applications hosted on GitHub
https://gittools.github.io/GitReleaseManager/docs/
MIT License
298 stars 39 forks source link

Error creating release "Value was either too large or too small for an Int32" #578

Closed cd21h closed 3 months ago

cd21h commented 3 months ago

Description

Create command fails with error.

Expected Behavior

Should create release.

Actual Behavior


[VRB] Loading configuration from file: Autofac.Extras.Quartz\GitReleaseManager.yaml
[VRB] Successfully deserialized configuration!
Using GitHub as VCS Provider
Creating release...
[VRB] Milestone 10.0.0 was specified
[VRB] No Release Name was specified, using 10.0.0.
[VRB] Building release notes...
[FTL] Value was either too large or too small for an Int32.
GitReleaseManager.Core.Exceptions.ApiException: Value was either too large or too small for an Int32.
 ---> System.OverflowException: Value was either too large or too small for an Int32.
   at System.Convert.ThrowInt32OverflowException()
   at System.Convert.ToInt32(Int64 value)
   at System.Int64.System.IConvertible.ToInt32(IFormatProvider provider)
   at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
   at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/SimpleJson.cs:line 1437
   at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/Http/SimpleJsonSerializer.cs:line 205
   at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/SimpleJson.cs:line 1492
   at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/Http/SimpleJsonSerializer.cs:line 205
   at Octokit.PocoJsonSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/SimpleJson.cs:line 1519
   at Octokit.Internal.SimpleJsonSerializer.GitHubSerializerStrategy.DeserializeObject(Object value, Type type) in /_/Octokit/Http/SimpleJsonSerializer.cs:line 205
   at Octokit.SimpleJson.DeserializeObject(String json, Type type, IJsonSerializerStrategy jsonSerializerStrategy) in /_/Octokit/SimpleJson.cs:line 584
   at Octokit.SimpleJson.DeserializeObject[T](String json, IJsonSerializerStrategy jsonSerializerStrategy) in /_/Octokit/SimpleJson.cs:line 596
   at Octokit.Internal.SimpleJsonSerializer.Deserialize[T](String json) in /_/Octokit/Http/SimpleJsonSerializer.cs:line 22
   at Octokit.Internal.JsonHttpPipeline.DeserializeResponse[T](IResponse response) in /_/Octokit/Http/JsonHttpPipeline.cs:line 62
   at Octokit.Connection.Run[T](IRequest request, CancellationToken cancellationToken, Func`2 preprocessResponseBody) in /_/Octokit/Http/Connection.cs:line 747
   at Octokit.ApiConnection.GetPage[TU](Uri uri, IDictionary`2 parameters, String accepts, ApiOptions options, Func`2 preprocessResponseBody) in /_/Octokit/Http/ApiConnection.cs:line 682
   at Octokit.ApiConnection.<>c__DisplayClass20_0`1.<<GetAll>b__0>d.MoveNext() in /_/Octokit/Http/ApiConnection.cs:line 240
--- End of stack trace from previous location ---
   at Octokit.ApiPagination.GetAllPages[T](Func`1 getFirstPage, Uri uri)
   at GitReleaseManager.Core.Provider.GitHubProvider.<>c__DisplayClass10_0.<<GetIssuesAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at GitReleaseManager.Core.Provider.GitHubProvider.ExecuteAsync[T](Func`1 action)
   --- End of inner exception stack trace ---
   at GitReleaseManager.Core.Provider.GitHubProvider.ExecuteAsync[T](Func`1 action)
   at GitReleaseManager.Core.ReleaseNotes.ReleaseNotesBuilder.GetIssuesAsync(Milestone milestone)
   at GitReleaseManager.Core.ReleaseNotes.ReleaseNotesBuilder.BuildReleaseNotesAsync(String user, String repository, String milestoneTitle, String template)
   at GitReleaseManager.Core.VcsService.CreateReleaseFromMilestoneAsync(String owner, String repository, String milestone, String releaseName, String targetCommitish, IList`1 assets, Boolean prerelease, String templateFilePath)
   at GitReleaseManager.Core.Commands.CreateCommand.ExecuteAsync(CreateSubOptions options)
   at GitReleaseManager.Cli.Program.Main(String[] args)

Possible Fix

  1. Add ability to enable debug logging to see request/response or exact data causing an error.

Steps to Reproduce

dotnet tool install -g GitReleaseManager.Tool
grm create -o alphacloud -r autofac.Extras.Quartz -m 10.0.0 -c master --token *** --verbose

Context

Cannot create a github release

Your Environment

windows 11

danielmarbach commented 3 months ago

To fix this problem the release manager might need to be updated to https://github.com/octokit/octokit.net/releases/tag/v10.0.0 due to https://github.com/octokit/octokit.net/pull/2890

cd21h commented 3 months ago

This also requires https://github.com/ubisoft/NGitLab/issues/491 as NGitlab uses int for MergeRequest ids

gep13 commented 3 months ago

@shatl said... This also requires https://github.com/ubisoft/NGitLab/issues/491 as NGitlab uses int for MergeRequest ids

Until there is a change in NGitLab library, I don't think we should pre-empt anything here in GitReleaseManager.

gittools-bot commented 3 months ago

:tada: This issue has been resolved in version 0.17.0 :tada:

The release is available on:

Your GitReleaseManager bot :package::rocket: