You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[FTL] The JSON value could not be converted to System.Int32. Path: $.id | LineNumber: 0 | BytePositionInLine: 16.
GitReleaseManager.Core.Exceptions.ApiException: The JSON value could not be converted to System.Int32. Path: $.id | LineNumber: 0 | BytePositionInLine: 16.
---> System.Text.Json.JsonException: The JSON value could not be converted to System.Int32. Path: $.id | LineNumber: 0 | BytePositionInLine: 16.
---> System.FormatException: Either the JSON value is not in a supported format, or is out of bounds for an Int32.
at System.Text.Json.ThrowHelper.ThrowFormatException(NumericType numericType)
at NGitLab.Impl.Json.Int32Converter.Read(Utf8JsonReader& reader, Type type, JsonSerializerOptions options) in /_/NGitLab/Impl/Json/Int32Converter.cs:line 33
at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue) at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.ReadJsonAndSetMember(Object obj, ReadStack& state, Utf8JsonReader& reader)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state) --- End of inner exception stack trace --- at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& state, Utf8JsonReader& reader, Exception ex) at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, JsonSerializerOptions options, ReadStack& state)
at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 utf8Json, JsonTypeInfo`1 jsonTypeInfo, Nullable`1 actualByteCount) at System.Text.Json.JsonSerializer.ReadFromSpan[TValue](ReadOnlySpan`1 json, JsonTypeInfo`1 jsonTypeInfo) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at NGitLab.Impl.Json.Serializer.Deserialize[T](String json) in /_/NGitLab/Impl/Json/Serializer.cs:line 29 at NGitLab.Impl.HttpRequestor.<>c__DisplayClass11_0`1.<To>b__0(Stream s) in /_/NGitLab/Impl/HttpRequestor.cs:line 67
at NGitLab.Impl.HttpRequestor.StreamAndHeaders(String tailAPIUrl, Action`2 parser) in /_/NGitLab/Impl/HttpRequestor.cs:line 148 at NGitLab.Impl.HttpRequestor.To[T](String tailAPIUrl) in /_/NGitLab/Impl/HttpRequestor.cs:line 65 at GitReleaseManager.Core.Provider.GitLabProvider.<>c__DisplayClass14_0.<CreateIssueCommentAsync>b__0() in C:\code\GitReleaseManager\src\GitReleaseManager.Core\Provider\GitLabProvider.cs:line 111 at GitReleaseManager.Core.Provider.GitLabProvider.ExecuteAsync(Func`1 action) in C:\code\GitReleaseManager\src\GitReleaseManager.Core\Provider\GitLabProvider.cs:line 412 --- End of inner exception stack trace --- at GitReleaseManager.Core.Provider.GitLabProvider.ExecuteAsync(Func`1 action) in C:\code\GitReleaseManager\src\GitReleaseManager.Core\Provider\GitLabProvider.cs:line 420 at GitReleaseManager.Core.VcsService.AddIssueCommentsAsync(String owner, String repository, Milestone milestone) in C:\code\GitReleaseManager\src\GitReleaseManager.Core\VcsService.cs:line 399 at GitReleaseManager.Core.VcsService.CloseMilestoneAsync(String owner, String repository, String milestoneTitle) in C:\code\GitReleaseManager\src\GitReleaseManager.Core\VcsService.cs:line 262 at GitReleaseManager.Core.Commands.CloseCommand.ExecuteAsync(CloseSubOptions options) in C:\code\GitReleaseManager\src\GitReleaseManager.Core\Commands\CloseCommand.cs:line 21 at GitReleaseManager.Cli.Program.Main(String[] args) in C:\code\GitReleaseManager\src\GitReleaseManager.Cli\Program.cs:line 36
Context
This is related to an upstream issue with the NGitLab library which is being used. It is similar to another issue which was affecting GitHub. Basically, the type of some of the properties on the API Models are set to be an int32, and now the ids of the issues/PRs/Comments, etc, are now bigger than the maximum integer allowed in that type, and as a result, they fail when the serialization of the model is attempted.
This should be fixed in version 7.0.0 of NGitLab, so we will need to update to that package version, and make any required follow up changes.
Your Environment
I have a FakeProject in GitLab, which is used to test these things out, which can be found here:
This addresses an issue which was seen when trying to close milestones
using the GitLab provider. There would be an error thrown regarding
being able to correctly serialize a number into an int32, since the
number was too big.
An upstream change was needed in NGitLab, so switch to usign to a long.
There was a similar error when using GitHub, and a bump in the version
of Octokit being used was required.
This has been tested against a GitLab repository, and the close command
which was previously failing is now working.
This addresses an issue which was seen when trying to close milestones
using the GitLab provider. There would be an error thrown regarding
being able to correctly serialize a number into an int32, since the
number was too big.
An upstream change was needed in NGitLab, so switch to usign to a long.
There was a similar error when using GitHub, and a bump in the version
of Octokit being used was required.
This has been tested against a GitLab repository, and the close command
which was previously failing is now working.
Description
When running some GitReleaseManager commands using the GitLab provider, a fatal error is thrown, and the command does not complete successfully.
Error that is thrown is:
Expected Behavior
Running any command in GitReleaseManager, when using the GitLab provider, should complete successfully.
Actual Behavior
A fatal error is being thrown, and the command is not completing successfully.
Possible Fix
Update to the latest NGitLab package version.
Steps to Reproduce
Make sure that you have a milestone configured, with some issues assigned to it with correct labels, etc, and then run:
This should work, without any problems. Then run:
Which should also run without any problems.
Make sure that you have a GitReleaseManager.yaml file in place, which enables the
use-issue-comments: true
configuration, and then run:This should fail with the following error:
Context
This is related to an upstream issue with the NGitLab library which is being used. It is similar to another issue which was affecting GitHub. Basically, the type of some of the properties on the API Models are set to be an
int32
, and now the ids of the issues/PRs/Comments, etc, are now bigger than the maximum integer allowed in that type, and as a result, they fail when the serialization of the model is attempted.This should be fixed in version 7.0.0 of NGitLab, so we will need to update to that package version, and make any required follow up changes.
Your Environment
I have a FakeProject in GitLab, which is used to test these things out, which can be found here:
https://gitlab.com/gep13/fakeproject
The text was updated successfully, but these errors were encountered: