[X] I have verified the problem exists in the latest version
[X] I have searched open and closed issues to make sure it isn't already reported
[X] I have written a descriptive issue title
[X] I have linked the original source of this report
[X] I have tagged the issue appropriately (area/*, kind/bug, tag/regression?)
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
Create a project with a Deploy a Package step
Set the package to a variable from a Library Variable Set
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)
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
Log excerpt
Affected versions
Tested on Octopus Server 2020.6.4671
Workarounds
Use a Project variable (with at least one unscoped value)
Links
Internal Link