bagetter / BaGetter

A lightweight NuGet and symbol server
https://www.bagetter.com
MIT License
166 stars 38 forks source link

Azure blob storage support #127

Closed Pokorny-FirstIS closed 3 months ago

Pokorny-FirstIS commented 3 months ago

Describe the bug

Application throws exception when configured to use Azure blob storage as storage.

      System.ArgumentNullException: Value cannot be null. (Parameter 'storage')
         at BaGetter.Core.PackageStorageService..ctor(IStorageService storage, ILogger`1 logger) in /_/src/BaGetter.Core/Storage/PackageStorageService.cs:line 27
         at InvokeStub_PackageStorageService..ctor(Object, Span`1)

To Reproduce

Steps to reproduce the behavior:

  1. Download 1.1.0 version from GH releases and unzip
  2. Configure the application to use Azure blob storage (see below my values). I followed the documented structure - https://www.bagetter.com/docs/Installation/azure#azure-blob-storage
  3. Try to upload a package using nuget push - the exception is thrown

Expected behavior

Expected is the application use the configured storage correctly.

Screenshots

Additional context

Version 1.1.0 - downloaded from GH releases

The configuration in appsettings.json file:

  "Storage": {
    "Type": "AzureBlobStorage",
    "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net",
    "Container": "...",
  },

I have found this PR (https://github.com/bagetter/BaGetter/pull/6) describing the disable is temporary however it lasts many months now. Even project documentation is not aligned.

Is it still disabled by a reason? What is the reason? Do you have a plan/schedule to enable it back? When it might happen? Or should I make simple commit/PR to enable it?

Thank you much for your effort with the project overtaking and maintaining!

seriouz commented 3 months ago

Yes Azure is disabled currently. The main problem: It cannot be activated that easily because the Azure API has changed too much and we have to make some huges changes or event make a whole rewrite of the module. We know this is a problem, but currently no one tries to tackle it. If you want to have a look into it this would be awesome.

@Regenhardt You not currently looking into this, right?

Regenhardt commented 3 months ago

I'm not currently on that, no. I could look into it this weekend though. I'd like to add Azure services one by one, starting with blob storage because it's the most obvious specific use case.

Pokorny-FirstIS commented 3 months ago

FYI: I've just deployed the application built locally based on https://github.com/bagetter/BaGetter/pull/128/commits/a8b4051f6f157c431bd16be6044590e7c1251a63 (one within https://github.com/bagetter/BaGetter/pull/128) and Azure blob storage usage works like a charm.

I think this issue is almost solved and ready to be closed once the PR gets merged. Thank you very much for fast work!

seriouz commented 3 months ago

@Pokorny-FirstIS thanks for testing this! I'll look at the PR now.