So one of our developers ran across an issue today where they noticed that a release had a package version selected that was several thousand builds old.
We have a package uploaded to Octopus called TFSPlugin that’s latest version is 9696-beta. When we click the “Create Release” button the version that shows up in the Latest column for that package is 4141-beta.
When a release is created via the CLI/API in TeamCity, the correct version is retrieved and added to the new release.
When I pull back the latest version using the REST API path /api/packages?nuGetPackageId=TFSPlugin&skip=0&take=1 I get the following:
{
“ItemType”: “Package”,
“TotalResults”: 225,
“ItemsPerPage”: 1,
“NumberOfPages”: 225,
“LastPageNumber”: 224,
“Items”: [
{
“Id”: “packages-TFSPlugin.9696-beta”,
“PackageSizeBytes”: 20161451,
“Hash”: “784def5b02f4c7104793a53a43e0dc95edb663b4”,
“NuGetPackageId”: “TFSPlugin”,
“PackageId”: “TFSPlugin”,
“NuGetFeedId”: “feeds-builtin”,
“FeedId”: “feeds-builtin”,
“Title”: “TFSPlugin”,
“Summary”: null,
“Version”: “9696-beta”,
“Description”: null,
“Published”: “2020-10-07T11:26:26.786+00:00”,
“ReleaseNotes”: null,
“FileExtension”: “.zip”,
“PackageVersionBuildInformation”: null,
“Links”: {
“Self”: “/api/Spaces-1/packages/packages-TFSPlugin.9696-beta”,
“AllVersions”: “/api/Spaces-1/packages?nuGetPackageId=TFSPlugin”,
“Feed”: “/api/feeds/feeds-builtin”,
“Raw”: “/api/Spaces-1/packages/packages-TFSPlugin.9696-beta/raw”
}
}
],
“Links”: {
“Self”: “/api/Spaces-1/packages?nuGetPackageId=TFSPlugin&skip=0&take=1”,
“Template”: “/api/Spaces-1/packages{/id}{?nuGetPackageId,filter,latest,skip,take,includeNotes}”,
“Page.All”: “/api/Spaces-1/packages?nuGetPackageId=TFSPlugin&skip=0&take=2147483647”,
“Page.Next”: “/api/Spaces-1/packages?nuGetPackageId=TFSPlugin&skip=1&take=1”,
“Page.Current”: “/api/Spaces-1/packages?nuGetPackageId=TFSPlugin&skip=0&take=1”,
“Page.Last”: “/api/Spaces-1/packages?nuGetPackageId=TFSPlugin&skip=224&take=1”
}
}
At the moment we’re telling the developers to be cautions about creating a new release manually, but is there any way to clear a cache or something to get this value to show up correctly?
Thanks!