OctopusDeploy / Issues

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

When deploying from a trigger, Octopus is unable to use dynamic packages (feed selection) via variables within a library variable set #6829

Open donnybell opened 3 years ago

donnybell commented 3 years ago

Prerequisites

The bug

When deploying from a trigger, Octopus is unable to use dynamic packages (feed selection) via variables within a library variable set

What I expected to happen

Since this works with Project level variables, I'd expect this to work the same way

Steps to reproduce

  1. Create a project with a Deploy a Package step
  2. Set the package to a variable from a Library Variable Set
  3. Create a deployment trigger with "Deploy new release" selected

Log excerpt

                    |   == Warning: Processing create and deploy ==
12:33:19   Info     |     Processing trigger [create and deploy](~/app#/Spaces-1/projects/Projects-221/triggers/scheduled/edit/ProjectTriggers-41)...
12:33:19   Info     |     Creating and deploying a new release for project SKB Trigger Test in the Default channel to Dev.
12:33:19   Error    |     A scheduled trigger failed while attempting to create and deploy a release
                    |     The feed '#{PackageId}' referenced by the step 'Deploy a Package' in this project could not be resolved. Please review your feed variable.
                    |     Octopus.Server.Communications.Packages.ReleaseCreation.ReleaseCreationFailedException: The feed '#{PackageId}' referenced by the step 'Deploy a Package' in this project could not be resolved. Please review your feed variable.
                    |     at Octopus.Server.Communications.Packages.SnapshotCreationFactory`1.ValidateFeedAvailable(IEnumerable`1 availableFeedIds, String feedId, String actionName) in C:\BuildAgent\work\b5c671f6c6f2b660\source\Octopus.Server\Communications\Packages\SnapshotCreationFactory.cs:line 181
                    |     at Octopus.Server.Communications.Packages.SnapshotCreationFactory`1.AddLatestPackageWhereNoneExplicitlyProvided(IOctopusQueryExecutor queryExecutor, ISnapshot snapshot, IProcess deploymentProcess, PackageReferenceResolver packageReferenceResolver) in C:\BuildAgent\work\b5c671f6c6f2b660\source\Octopus.Server\Communications\Packages\SnapshotCreationFactory.cs:line 164
                    |     at Octopus.Server.Communications.Packages.SnapshotCreationFactory`1.FillAndCreateSnapshot(IOctopusQueryExecutor queryExecutor, Project project, IProcess process, TSnapshot snapshot, IOctopusPrincipalInternal octopusPrincipal) in C:\BuildAgent\work\b5c671f6c6f2b660\source\Octopus.Server\Communications\Packages\SnapshotCreationFactory.cs:line 80
                    |     at Octopus.Server.Communications.Packages.ReleaseCreation.ReleaseCreationFactory.FillAndCreateRelease(IOctopusQueryExecutor queryExecutor, Project project, Release release, IOctopusPrincipalInternal octopusPrincipal) in C:\BuildAgent\work\b5c671f6c6f2b660\source\Octopus.Server\Communications\Packages\ReleaseCreation\ReleaseCreationFactory.cs:line 42
                    |     at Octopus.Server.Orchestration.ServerTasks.ProcessRecurringScheduledDeployments.ScheduledProjectTriggerProcessor.CreateRelease(Project project, DeploymentSettings settings, Channel channel) in C:\BuildAgent\work\b5c671f6c6f2b660\source\Octopus.Server\Orchestration\ServerTasks\ProcessRecurringScheduledDeployments\ScheduledProjectTriggerProcessor.cs:line 397
                    |     at Octopus.Server.Orchestration.ServerTasks.ProcessRecurringScheduledDeployments.ScheduledProjectTriggerProcessor.DeployNewRelease(ProjectTrigger trigger) in C:\BuildAgent\work\b5c671f6c6f2b660\source\Octopus.Server\Orchestration\ServerTasks\ProcessRecurringScheduledDeployments\ScheduledProjectTriggerProcessor.cs:line 283
                    |     at Octopus.Server.Orchestration.ServerTasks.ProcessRecurringScheduledDeployments.ScheduledProjectTriggerProcessor.SafelyDeployNewRelease(ProjectTrigger trigger) in C:\BuildAgent\work\b5c671f6c6f2b660\source\Octopus.Server\Orchestration\ServerTasks\ProcessRecurringScheduledDeployments\ScheduledProjectTriggerProcessor.cs:line 253
                    |     Octopus.Server version 2020.6.4671 (2020.6.4671+Branch.release-2020.6.Sha.b17bea4a7d246d77cf829cc8c35cdf1211ad719d)
12:33:19   Verbose  |     Updated the last scheduled time for create and deploy to 3/30/2021 4:33:19 PM

Affected versions

Tested on Octopus Server 2020.6.4671

Workarounds

Use a Project variable (with at least one unscoped value)

Links

Internal Link

AdamHollow49 commented 3 years ago

Another user with issue: https://help.octopus.com/t/trigger-feeds-variable-cant-get-value/26846 Version: 2020.6.4722

Daniel-Spindler-Mandalay commented 1 year ago

Hi Team, any updates?

IsaacTrevino commented 1 year ago

+1