OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
162 stars 20 forks source link

An attempt was made to store 104 characters in the BuildInformation.PackageId column, which only allows 100 characters. #7126

Closed johnsimons closed 3 years ago

johnsimons commented 3 years ago

Team

Severity

One customer in the Cloud

Version

2021.2

Latest Version

I could reproduce the problem in the latest build

What happened?

It is possible to fail to push build information when the Package id referenced is over 100 characters.

This can happen when referencing docker images.

Reproduction

See https://seq.octopushq.com/#/events/?filter=@Id%20%3D%20%27event-594eb71793da08d9aec5267301000000%27&showExpanded&permalinkId=permalink-8396

Error and Stacktrace

Nevermore.StringTooLongException: An attempt was made to store 104 characters in the BuildInformation.PackageId column, which only allows 100 characters.
   at Nevermore.Util.DataModificationQueryBuilder.GetDocumentParameters(Func`2 allocateId, Object customAssignedId, Nullable`1 customIdAssignmentBehavior, Object document, DocumentMap mapping, DataModification dataModification, String prefix)
   at Nevermore.Util.DataModificationQueryBuilder.GetDocumentParameters(Func`2 allocateId, Object customAssignedId, IReadOnlyList`1 documents, DocumentMap mapping, DataModification dataModification)
   at Nevermore.Util.DataModificationQueryBuilder.PrepareInsert(IReadOnlyList`1 documents, InsertOptions options)
   at Nevermore.Advanced.WriteTransaction.Insert[TDocument](TDocument document, InsertOptions options)
   at Octopus.Server.Web.Api.Actions.BuildInformation.BuildInformationPostAction.ExecuteRegistered() in ./source/Octopus.Server/Web/Api/Actions/BuildInformation/BuildInformationPostAction.cs:line 126
   at Octopus.Server.Web.Infrastructure.Api.CustomResponder`1.Respond(TDescriptor options, NancyContext context) in ./source/Octopus.Server/Web/Infrastructure/Api/CustomResponder.cs:line 288
   at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object o, CancellationToken x) in ./source/Octopus.Server/Web/Infrastructure/OctopusNancyModule.cs:line 82
   at Nancy.Routing.Route`1.Invoke(DynamicDictionary parameters, CancellationToken cancellationToken)
   at Nancy.Routing.DefaultRouteInvoker.Invoke(Route route, CancellationToken cancellationToken, DynamicDictionary parameters, NancyContext context)
   at Nancy.Routing.DefaultRequestDispatcher.Dispatch(NancyContext context, CancellationToken cancellationToken)
   at Nancy.NancyEngine.InvokeRequestLifeCycle(NancyContext context, CancellationToken cancellationToken, IPipelines pipelines)
   at Octopus.NancyOwin.NancyMiddleware.RequestComplete(NancyContext context, IDictionary`2 environment, CancellationToken cancellationToken) in ./source/Octopus.Server/Owin/NancyMiddleware.cs:line 171
   at Octopus.NancyOwin.NancyMiddleware.<>c__DisplayClass3_0.<<UseNancy>b__1>d.MoveNext() in ./source/Octopus.Server/Owin/NancyMiddleware.cs:line 111
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Owin.WebSocketAcceptAdapter.<>c__DisplayClass6_0.<<AdaptWebSockets>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Builder.Extensions.MapWhenMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.HttpOverrides.HttpMethodOverrideMiddleware.Invoke(HttpContext context)
   at Octopus.Server.Web.UnitOfWorkMiddleware.InvokeAsync(HttpContext httpContext, IUnitOfWork unitOfWork) in ./source/Octopus.Server/Web/UnitOfWorkMiddleware.cs:line 47
   at Octopus.Server.Web.UnitOfWorkMiddleware.InvokeAsync(HttpContext httpContext, IUnitOfWork unitOfWork) in ./source/Octopus.Server/Web/UnitOfWorkMiddleware.cs:line 47
   at Octopus.Server.Web.Middleware.OctopusClientOldVersionWarningMiddleware.InvokeAsync(HttpContext context, IAutomationContext automationContext) in ./source/Octopus.Server/Web/Middleware/OctopusClientOldVersionWarningMiddleware.cs:line 38
   at Octopus.Server.Web.Middleware.DynamicContentHeadersMiddleware.InvokeAsync(HttpContext context) in ./source/Octopus.Server/Web/Middleware/DynamicContentHeadersMiddleware.cs:line 48
   at Octopus.Server.Web.Middleware.MaintenanceModeMiddleware.InvokeAsync(HttpContext context) in ./source/Octopus.Server/Web/Middleware/MaintenanceModeMiddleware.cs:line 55
   at Octopus.Server.Web.Middleware.OctopusAuthenticationMiddleware.InvokeAsync(HttpContext context, CorrelationId correlationId) in ./source/Octopus.Server/Web/Middleware/OctopusAuthenticationMiddleware.cs:line 67
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Octopus.Server.Web.Middleware.RequestLoggerMiddleware.InvokeAsync(HttpContext context) in ./source/Octopus.Server/Web/Middleware/RequestLoggerMiddleware.cs:line 42
   at Octopus.Server.Web.Middleware.TelemetryMiddleware.InvokeAsync(HttpContext context, CorrelationId correlationId) in ./source/Octopus.Server/Web/Middleware/TelemetryMiddleware.cs:line 74
   at Octopus.Server.Web.Middleware.ErrorHandlingMiddleware.InvokeAsync(HttpContext context, CorrelationId correlationId) in ./source/Octopus.Server/Web/Middleware/ErrorHandlingMiddleware.cs:line 100

More Information

No response

Workaround

No response

octoreleasebot commented 3 years ago

Release Note: Long package names are now correctly handled by build information

Octobob commented 2 years ago

:tada: The fix for this issue has been released in:

Release stream Release
2021.2 2021.2.7722
2021.3 2021.3.6994
2022.1+ all releases