Issues
Issues copied to clipboard
Deployment Overview doesn't consider "Channels" when Project is Tenanted and Overview page is filtered
Team
- [X] I've assigned a team label to this issue
Severity
Not Blocking
Version
2022.4.4601 (hotfix: 5911)
Latest Version
I could reproduce the problem in the latest build
What happened?
The overview page incorrectly shows the option to "DEPLOY..." for Environments that cannot be Deployed to when Projects and Channels are included.
The quickest way to see the issue is via the reproduction link.
Reproduction
https://octopus-operations.octopus.app/app#/Spaces-162/projects/project1/deployments?groupby=channel&release=Releases-51846
Steps to Reproduce
Create two Lifecycles in this configuration: Lifecycle 1: Development Uat Production
Lifecycle 2: Uat-Hotfix Production
Create a Tenant that is connected to a project and All environments listed above Create two channels - "Default" and "Hotfix"
Create a release for the "Default" Channel and then successfully deploy to the environment 'Development' for the Tenant.
Finally, go to the overview page of the project. Filter by the release version, that has been successfully deployed, then also Group By 'Channels'.
Issue 1 The Hotfix Channel appears in the Project Overview - although no release has been made for the Hotfix channel for that particular release.
Issue 2 Notice that the Production Environment, for the Channel Hotfix, shows the option to "DEPLOY..."
You are unable to deploy to this environment for this channel but this should not appear.
Error and Stacktrace
No response
More Information
No response
Workaround
Only an aesthetic bug. No workaround required.
Reproduced in 2022.2.7027
using the following script
var endpoint = new OctopusServerEndpoint("http://hex/dashboardbug");
var client = new OctopusClient(endpoint);
client.Repository.Users.SignIn("Admin", "");
/*
var me = client.Repository.Users.GetCurrent();
var space = client.Repository.Spaces.Create(new SpaceResource()
{
Name = "Issue7926",
SpaceManagersTeamMembers = new ReferenceCollection(me.Id)
});
var repository = client.ForSpace(space);
*/
var repository = client.Repository;
var developmentEnv = repository.Environments.Create(new EnvironmentResource() { Name = "Development" });
var uatEnv = repository.Environments.Create(new EnvironmentResource() { Name = "Uat" });
var productionEnv = repository.Environments.Create(new EnvironmentResource() { Name = "Production" });
var uatHotfixEnv = repository.Environments.Create(new EnvironmentResource() { Name = "Uat-Hotfix" });
var defaultLifecycle = new LifecycleResource() {Name = "DefaultChannel" };
defaultLifecycle.Phases.Add(new PhaseResource() {
Name = "TheName",
OptionalDeploymentTargets = new ReferenceCollection() { developmentEnv.Id, uatEnv.Id, productionEnv.Id }
});
defaultLifecycle = repository.Lifecycles.Create(defaultLifecycle);
var hotfixLifecycle = new LifecycleResource() { Name = "Hotfixes" };
hotfixLifecycle.Phases.Add(new PhaseResource()
{
Name = "TheName",
OptionalDeploymentTargets = new ReferenceCollection() { uatHotfixEnv.Id, productionEnv.Id }
});
hotfixLifecycle = repository.Lifecycles.Create(hotfixLifecycle);
var group = repository.ProjectGroups.GetAll()[0];
var project = repository.Projects.Create(new ProjectResource() {
Name = "Test",
ProjectGroupId = group.Id,
LifecycleId = defaultLifecycle.Id,
TenantedDeploymentMode = TenantedDeploymentMode.TenantedOrUntenanted
});
repository.Channels.Create(new ChannelResource() {
ProjectId = project.Id,
Name = "Hotfix",
LifecycleId = hotfixLifecycle.Id
});
var tenant = repository.Tenants.Create(new TenantResource() {
Name = "David",
ProjectEnvironments = new Dictionary<string, Octopus.Client.Model.ReferenceCollection>()
{
{ project.Id, new ReferenceCollection { developmentEnv.Id, uatEnv.Id, productionEnv.Id, uatHotfixEnv.Id } }
}
});
var process = repository.DeploymentProcesses.Get(project.DeploymentProcessId);
var action = process.AddOrUpdateStep("Do Something").AddOrUpdateScriptAction(
"DoSomething",
Octopus.Client.Model.DeploymentProcess.ScriptAction.InlineScript(ScriptSyntax.PowerShell, ";"),
ScriptTarget.Server
);
repository.DeploymentProcesses.Modify(process);
var release = repository.Releases.Create(new ReleaseResource() {
ProjectId = project.Id,
Version = "1.0.0"
});
repository.Deployments.Create(new DeploymentResource() {
ProjectId = project.Id,
ReleaseId = release.Id,
TenantId = tenant.Id,
EnvironmentId = developmentEnv.Id
});
The grouping doesn't exist in 2021.1
Actually on 2021.1
the grouping box doesn't appear until there are releases in multiple channels. And when filtered to a release the grouping dissapears



I've compared the API responses for the dashboard between 2021.1 and 2022.2 and they are the same
Another report: https://octopus.zendesk.com/agent/tickets/149948
Any updates here? It's not possible to properly use channels and tenants in parallel