Renaming tenant tag set used in CaC Project causes deployment process error
Severity
No response
Version
Earliest tried was 2025.3.14236
Latest Version
I could reproduce the problem in the latest build
What happened?
Create a TagSet name TagSet1 and add some Tags
Create a CaC project with 1 step In Conditions -> Tenant select a TenantTag and commit the project. Update TagSet1 name to TagSet2 and save Go back to process will see error: Error mapping from slugs to IDs for deployment process DeploymentProcess.Steps[0].Actions[0].TenantTags[0] has unknown slug "TagSet1/A"
Reproduction
- Create a TagSet name TagSet1 and add some Tags
- Create a CaC project with 1 step
- In Conditions -> Tenant select a TenantTag and commit the project.
- Update TagSet1 name to TagSet2 and save
- Go back to process to see error:
Error mapping from slugs to IDs for deployment process
DeploymentProcess.Steps[0].Actions[0].TenantTags[0] has unknown slug "TagSet1/A"
Error and Stacktrace
"Exception of type 'Octopus.Core.Serialization.Ocl.TinyTypeConversion.TinyTypeMappingException' was thrown."
Octopus.Core.Serialization.Ocl.TinyTypeConversion.TinyTypeMappingException: Exception of type 'Octopus.Core.Serialization.Ocl.TinyTypeConversion.TinyTypeMappingException' was thrown.
at Octopus.Core.Serialization.Ocl.TinyTypeConversion.TinyTypeConverterExtensionMethods.Convert(ITinyTypeConverter converter, TinyType`1 entityId, Object obj, TinyTypeConversionStrategy tinyTypeConversionStrategy) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Serialization\Ocl\TinyTypeConversion\TinyTypeConverterExtensionMethods.cs:line 14
at Octopus.Core.Serialization.Ocl.Transformation.Transforms.Decorators.IdToSlugOclTransformDecorator`1.ConvertSlugsToIds(T model, GitDocumentContext context) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Serialization\Ocl\Transformation\Transforms\Decorators\IdToSlugOclTransformDecorator.cs:line 38
at Octopus.Core.Serialization.Ocl.Transformation.Transforms.Decorators.IdToSlugOclTransformDecorator`1.TransformFromOcl(String ocl, GitDocumentContext context, GitRef gitRef, OclFile
Info fileInfo, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Serialization\Ocl\Transformation\Transforms\Decorators\IdToSlugOclTransformDecorator.cs:line 32
at Octopus.Core.Serialization.Ocl.OclHandler.FromOcl[T](String ocl, GitDocumentContext context, GitRef gitRef, OclFileInfo fileInfo, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Serialization\Ocl\OclHandler.cs:line 78
at Octopus.Core.Serialization.Ocl.Documents.SingleDocumentOclFileHandler`2.ReadSingleOclDocument(GitDocumentContext context, GitRef gitRef, IReadOnlyFileSystem fileSystem, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Serialization\Ocl\Documents\SingleDocumentOclFileHandler.cs:line 35
at Octopus.Core.Serialization.Ocl.Documents.SingleDocumentOclFileHandler`2.ReadOclDocument(TKey id, GitDocumentContext context, GitRef gitRef, IReadOnlyFileSystem fileSystem, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Serialization\Ocl\Documents\SingleDocumentOclFileHandler.cs:line 25
at Octopus.Core.Serialization.Ocl.Documents.GitOclDocumentService.GetDocument[TDocument,TKey](TKey id, GitDocumentContext context, GitRef gitRef, IReadWriteVirtualFileSystem fileSystem, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Serialization\Ocl\Documents\GitOclDocumentService.cs:line 32
at Octopus.Core.Git.Transactions.GitDocumentTransaction.<>c__DisplayClass17_0`2.<<GetDocument>b__0>d.MoveNext() in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Git\Transactions\GitDocumentTransaction.cs:line 128
--- End of stack trace from previous location ---
at Octopus.Core.Git.Transactions.GitDocumentTransaction.MigrateBeforeExecute[T](Func`1 innerOperation, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Git\Transactions\GitDocumentTransaction.cs:line 274
at Octopus.Core.Git.Transactions.GitDocumentTransaction.GetDocument[TDocument,TKey](TKey id, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Git\Transactions\GitDocumentTransaction.cs:line 123
at Octopus.Core.Git.Transactions.GitDocumentTransaction.GetDocumentOrNull[TDocument,TKey](TKey id, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Git\Transactions\GitDocumentTransaction.cs:line 101
at Octopus.Core.Persistence.Git.GitDocumentStore`2.GetOrNullAsync(TKey id, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Persistence\Git\GitDocumentStore.cs:line 45
at Octopus.Core.Persistence.ChangeTracking.Git.NonTrackingDocumentStoreDecorator`2.GetOrNullAsync(TKey id, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Persistence\ChangeTracking\Git\NonTrackingDocumentStoreDecorator.cs:line 27
at Octopus.Core.Persistence.DocumentStore`2.GetOrNullAsync(TKey id, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Persistence\DocumentStore.cs:line 83
at Octopus.Core.Persistence.ProcessTemplateVersionHydratorDecorator`2.GetOrNullAsync(TKey id, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Persistence\ProcessTemplateVersionHydratorDecorator.cs:line 252
at Octopus.Core.Persistence.ReadOnlyDocumentStore`2.GetOrNullAsync(TKey id, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Persistence\ReadOnlyDocumentStore.cs:line 35
at Octopus.Core.Features.Projects.GetProjectSummaryRequestHandler.HandleInternal(ProjectReference projectReference, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Features\Projects\GetProjectSummaryRequestHandler.cs:line 80
at Octopus.Core.Features.Projects.GetProjectSummaryRequestHandler.Handle(GetProjectSummaryInGitRequest request, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Features\Projects\GetProjectSummaryRequestHandler.cs:line 61
at Octopus.Core.Infrastructure.Mediator.AutofacMediator.Request[TRequest,TResponse](IRequest`2 request, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Core\Infrastructure\Mediator\AutofacMediator.cs:line 109
at Octopus.Server.Web.Controllers.Projects.GetProjectSummaryController.GetProjectSummaryInGit(GetProjectSummaryInGitRequest request, CancellationToken cancellationToken) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Controllers\Projects\GetProjectSummaryController.cs:line 30
at lambda_method26319(Closure, Object)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|7_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Octopus.Server.Web.RouteTogglingMiddleware`1.InvokeAsync(HttpContext httpContext) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\RouteTogglingMiddleware.cs:line 13
at Octopus.Server.Web.Middleware.BoundaryTrailerRewriteMiddleware.Invoke(HttpContext context, IAutomationContext automationContext) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Middleware\BoundaryTrailerRewriteMiddleware.cs:line 45
at Octopus.Server.Web.Middleware.OpenFeatureUserContextMiddleware.InvokeAsync(HttpContext httpContext, IOctopusPrincipalInternal principal, IFeatureClient client) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Middleware\OpenFeatureUserContextMiddleware.cs:line 30
at Octopus.Server.Web.Infrastructure.Authentication.AuthorizationMiddlewareResultHandler.HandleAsync(RequestDelegate next, HttpContext context, AuthorizationPolicy policy, PolicyAuthorizationResult authorizeResult) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Infrastructure\Authentication\AuthorizationMiddlewareResultHandler.cs:line 50
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Octopus.Server.Web.UnitOfWorkMiddleware.InvokeAsync(HttpContext httpContext, IUnitOfWork unitOfWork) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\UnitOfWorkMiddleware.cs:line 31
at Octopus.Server.Web.UnitOfWorkMiddleware.InvokeAsync(HttpContext httpContext, IUnitOfWork unitOfWork) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\UnitOfWorkMiddleware.cs:line 42
at Octopus.Server.Web.Middleware.OctopusClientOldVersionWarningMiddleware.InvokeAsync(HttpContext context, IAutomationContext automationContext) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Middleware\OctopusClientOldVersionWarningMiddleware.cs:line 24
at Octopus.Server.Web.Middleware.DynamicContentHeadersMiddleware.InvokeAsync(HttpContext context) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Middleware\DynamicContentHeadersMiddleware.cs:line 50
at Octopus.Server.Web.Middleware.MaintenanceModeMiddleware.InvokeAsync(HttpContext context) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Middleware\MaintenanceModeMiddleware.cs:line 66
at Octopus.Server.Web.Middleware.OctopusAuthenticationMiddleware.InvokeAsync(HttpContext context, IUserAuthenticator userAuthenticator, IUserSessionService userSessionService, IWebAuthCache authCache, ILogger logger) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Middleware\OctopusAuthenticationMiddleware.cs:line 73
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Octopus.Server.Web.Middleware.TelemetryMiddleware.InvokeAsync(HttpContext context) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Middleware\TelemetryMiddleware.cs:line 64
at Octopus.Server.Web.Middleware.ErrorHandlingMiddleware.InvokeAsync(HttpContext context) in C:\Users\BecCallow\OctopusDeploy\source\Octopus.Server\Web\Middleware\ErrorHandlingMiddleware.cs:line 124
More Information
No response
Workaround
Rename the tenant tag set to its original name to resolve the error.
If it is important to keep the new name for the tag set, then remove all tags within the set from the deployment process before renaming the set, and then add them to the process again once the set has been renamed.