Issues
Issues copied to clipboard
Release Information is empty after updating scoped variable used for PackageId.
Severity
Low, non blocking.
Version
All
Latest Version
I could reproduce the problem in the latest build
What happened?
Release Information is empty after updating the scoped variable used for a PackageId. This happens because we resolve to the last updated variable value when determining release information.
Reproduction
- Create a package with build information. Let's say this package has a ID of Test.Package
- Create a deployment process script step with a package reference that uses a variable package ID. Let's say this variable is called #{templatePackageName}
- Create a project variable called templatePackageName . Add a variable value Test.Package and save.
- Add another value for templatePackageName, with a scope this time the value is Test.IncorrectPackage
- Create a release and notice no build information shows up. If you've configured a release note template, no release notes will show up either.
More Information
The bug is due to the way the variable package ID is resolved when the release is created. When constructing build information for the release, we call ToDictionary which causes the package ID to resolve to the last variable value added, regardless of scope.
This is a complicated area to resolve, because of variable scoping different packages can be deployed based on environments, targets or any other variables. The release is a general snapshot for a deployment and doesn't have context at this stage for any of those variables. I think a change that would make sense here is to resolve all build information for all possible packages so we include the changes in both Test.Package
and Test.IncorrectPackage
in the release notes.
Workaround
If you remove the Test.Package value, hit Save. Then re-add the Test.Package value, then hit Save. When you create a release, build information and release notes will be there.