Upgrading v2019.6.8 -> v2019.12.8 breaks the Library > Packages page

I’m doing this locally by importing our production DB to my local Octo server and then running the new server msi. If I reindex the local package repository while it’s still v2019.6.8, I still get the error below once I upgrade (after upgrade there are no indexing options). This error appears on both the package library page (app#/Spaces-1/library/builtinrepository) and the new build information page (app#/Spaces-1/library/buildinformation):

On a release page (app#/Spaces-1/projects/[project]/deployments/releases/[release #]) I see the correct build info:

But the release notes are missing on the deploy page:

Everything else seems to be working.

Hi @rjunruh!

Sorry to hear that you’re having issues - it looks you might be hitting this issue. This has been fixed and will be shipping in our upcoming 2020.2.0 release.

You will want to ensure that your TFS plugin and Octopus CLI tools are up-to-date, to prevent this issue occurring for subsequent package pushes.

You should be able to run the following SQL query to update your package build information to prevent the NRE error you’re seeing here. As always, please make sure that you have a working backup of your database before performing any SQL actions on the database:

UPDATE dbo.[BuildInformation]
SET JSON = REPLACE(JSON, '"Branch":null', '"Branch":""')

Our entries in dbo.[BuildInformation] that have an ID like BuildInformation-# all have a “Branch” property but the entries that are like PackageMetadata-# don’t. So I have to also run this to get it to work:

USE OctoDeploy
UPDATE dbo.[BuildInformation]
SET JSON = REPLACE(JSON, ',"VcsType":', ',"Branch":"","VcsType":')
WHERE JSON NOT LIKE '%,"Branch":%'

But am I missing some update step? New package pushes are ok. It’s just the ones from before the update that don’t have a valid “Branch.” I think things are working now.

Just to be clear about my question about me missing an update step, OctopusPackageMetadata doesn’t have a “Branch” property so anyone using the old build info process should have the same issue we’re having, right? Or was there some DB update step I’m skipping by going straight from v2019.6.8 to v2019.12.8 that would add the missing “Branch” property?

We are passing the build info with our own code based on the OctopusPackageMetadata and OctopusBuildInformation versions of the OctopusDeploy/OctoTFS repo.

Hi @rjunruh,

Sorry for the late response here, I realise this one slipped through the cracks. We did change our backend system here, moving from the PackageMetadata format to the BuildInformation format, which has a different API endpoint and table schema. The issue here is that the older version of the TFS plugin here was pushing to the old endpoint, which, while the compatibility wrapper here made it work with , we didn’t account for this case, and the branch field (which exists in BuildInformation, but not in the PackageMetadata), was blank. We’ve fixed it up to handle this more gracefully in 2020.2. I hope this clarifies things!