Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

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

Closed
cd21h opened this issue Mar 6, 2024 · 4 comments · Fixed by #579
Closed

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

cd21h opened this issue Mar 6, 2024 · 4 comments · Fixed by #579

Comments

@cd21h
Copy link

cd21h commented Mar 6, 2024

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
Copy link
Contributor

danielmarbach commented Mar 7, 2024

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 octokit/octokit.net#2890

cd21h added a commit to cd21h/GitReleaseManager that referenced this issue Mar 7, 2024
@cd21h
Copy link
Author

cd21h commented Mar 7, 2024

This also requires ubisoft/NGitLab#491 as NGitlab uses int for MergeRequest ids

DavidBoike added a commit to DavidBoike/GitReleaseManager that referenced this issue Mar 7, 2024
@gep13 gep13 added this to the 0.17.0 milestone Mar 9, 2024
@gep13 gep13 changed the title Error creating release Value was either too large or too small for an Int32. Error creating release "Value was either too large or too small for an Int32" Mar 9, 2024
@gep13
Copy link
Member

gep13 commented Mar 9, 2024

@shatl said...
This also requires ubisoft/NGitLab#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.

gep13 pushed a commit to DavidBoike/GitReleaseManager that referenced this issue Mar 9, 2024
gep13 pushed a commit to DavidBoike/GitReleaseManager that referenced this issue Mar 9, 2024
gep13 added a commit that referenced this issue Mar 9, 2024
(#578) Bump Octokit to 10.0.0 to fix oversized ints
@gep13 gep13 closed this as completed Mar 9, 2024
@gep13 gep13 linked a pull request Mar 9, 2024 that will close this issue
6 tasks
gittools-bot pushed a commit that referenced this issue Mar 9, 2024
Merge pull request #579 from DavidBoike/int-too-small

(#578) Bump Octokit to 10.0.0 to fix oversized ints
gep13 added a commit that referenced this issue Mar 9, 2024
* release/0.17.0:
  (#578) Make the issue ID a long
  (GH-578) Bump Octokit to 10.0.0 to fix oversized ints
  (#574) Exclude all issues with label
  (#476) Add validation of input file path handler
  (#439) Add option to disable warning to stderr
@gittools-bot
Copy link

🎉 This issue has been resolved in version 0.17.0 🎉

The release is available on:

Your GitReleaseManager bot 📦🚀

gittools-bot pushed a commit that referenced this issue Mar 9, 2024
Merge branch 'release/0.17.0'

* release/0.17.0:
  (#578) Make the issue ID a long
  (GH-578) Bump Octokit to 10.0.0 to fix oversized ints
  (#574) Exclude all issues with label
  (#476) Add validation of input file path handler
  (#439) Add option to disable warning to stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants