External package cache ignored after upgrade

operations's Avatar

operations

20 Feb, 2018 02:01 AM

Hi Guys, this morning I upgraded our 3.15 system to the latest build. The first deployment on the new build was to deploy a relatively old package that no longer exists on the external NuGet feed, but it is the current version on this particular tenant's PROD site. Before upgrading, this was not an issue because that package was still in the \Files\feeds-janison-teamcity-auth folder on our Octopus server. However, since the upgrade, even though these old package files are still in that folder, Octopus went back to the external NuGet provider looking for this package, which is no longer there, and failed.
I've attached a screen shot of the files in this folder, it seems that at some point in the Octopus development path the file names of these files changed, as per the screen shot you can see four newer files that have been downloaded for other deployments. My question is, is there any way for us to make Octopus 'aware' of these cached files for future deployments? There are many more files in this folder than there are current packages on the NuGet feed, which is cleaned up to only retain the last few artifacts per build configuration. Otherwise, we have to resort to manual deployments for any that are no longer current in the NuGet feed.

  1. Support Staff 1 Posted by Alex Rolley on 21 Feb, 2018 05:41 AM

    Alex Rolley's Avatar

    Hi,

    Thanks for getting in touch!

    It looks like you have run across a breaking change on version 2018.2 that we identified in the release notes:

    In anticipation of some upcoming new feed types we have hit the point where we were forced to revisit how we expose the packages API for external feeds, and how we store cached packages for deployments. Unless you are hitting the Octopus API directly to search through your external feeds or rely on specific naming of the cached packages, then there should be almost no impact to you. One side effect of the change to package cache names is that the current packages cache on the server and tentacles will be no longer checked so new deloyments will use the new package names. More details about these changes are available in the GitHub tickets "Packages API does not meet the requirements of our expanding feed types #4114" and "Modify the cache naming format to allow for new feed formats #4211".
    

    As for getting those packages back in to Octopus we have a few options. First option would be to re-import the NuGet package back into your external feed so that your Octopus instance can re-consume it. Second option would be to import the NuGet files into Octopus' internal feed then update the deployments to grab the packages from there rather than the external feed. Final option (which we haven't tested) would be to re-name the files into the new format and see if we re-index the packages.

    The other thing to now be aware of is that we will empty packages from the cache approx. every 30 days [or to be fair we can invalidate the cache at any time], so if you do re-import to the external feed you will need to ensure that they remain available.

    Please let me know if there is anything else that we can help with,

    Regards,

    Alex

  2. 2 Posted by operations on 26 Feb, 2018 10:00 PM

    operations's Avatar

    Thanks Alex - I did try renaming the files to the new format, which didn't appear to work. I'll have a look at the other options, fortunately we haven't hit this issue again since that initial deployment, as I mentioned it will only occur when someone wants to deploy an older release.
    Cheers, Simon.

  3. 3 Posted by operations on 27 Feb, 2018 02:19 AM

    operations's Avatar

    Good news! I used PowerShell to rename all the old package files, and restarted the Octopus Server (which I didn't do last time) in the hope it would somehow re-index the contents of this folder, and it appears to have done this successfully, so we are good to go! Thanks for the suggestions Alex.

    Cheers, Simon.

  4. operations closed this discussion on 27 Feb, 2018 02:19 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac