Azure Datalake Blob storage gen2 fails to connect [COMMUNITY HELP WANTED]
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
調査の方向性
Start by reading the Azure Blob Storage registration and connection path, especially StorageFactory.Modules.UseAzureBlobStorage() and FromConnectionString, then inspect ExtendedSdk.GetHttpPipeline(BlobServiceClient). The report says that method relies on Azure SDK internals and throws a NullReferenceException; identify the SDK change that breaks the pipeline access and reproduce the failure with a Gen2 connection. Done means the connection works without the reported exception.
索引モデルが issue の本文から書いたものです。
説明
Problem:
Try to create a blob connection azure blobstorage gen2 with FromConnectionString
did the StorageFactory.Modules.UseAzureBlobStorage() to register the azure blob storage extention
throws a NullReferenceException
Cause:
ExtendedSdk.GetHttpPipeline(BlobServiceClient sdkClient) is using internals of Azure BlobServiceClient and they have changed I assume.
This ugly hack did the trick:
var accountName = <<StorageAccountName>>;
var credential = new StorageSharedKeyCredential(accountName ,<<accessToken>>);
var uri = new Uri($"https://{accountName}.blob.core.windows.net/");
var client = new BlobServiceClient(uri, credential);
FieldInfo BlobClientConfigurationField =
typeof(BlobServiceClient).GetField("_clientConfiguration", BindingFlags.NonPublic | BindingFlags.Instance);
var clientConfig = BlobClientConfigurationField.GetValue(client);
var clientConfigType = clientConfig.GetType();
PropertyInfo httpPipelineProperty =
clientConfigType.GetProperty("Pipeline", BindingFlags.Public | BindingFlags.Instance);
Azure.Core.Pipeline.HttpPipeline httpPipeline = httpPipelineProperty.GetValue(clientConfig) as Azure.Core.Pipeline.HttpPipeline;
Type AzureDataLakeStorageType = typeof(IBlobStorage)
.Assembly.GetType("FluentStorage.Azure.Blobs.AzureDataLakeStorage");
// ConstructorInfo method = t.GetConstructor(new Type[] { typeof(BlobServiceClient), typeof(string), typeof(StorageSharedKeyCredential), typeof(string )} );
//# Object o = method.Invoke(new Object[] {client, accountName, credential, null});
Type extendedSdkType = typeof(IBlobStorage)
.Assembly.GetType("Blobs.ExtendedSdk");
var dlStorage = FormatterServices.GetUninitializedObject(AzureDataLakeStorageType);
var extendedSdk = FormatterServices.GetUninitializedObject(extendedSdkType);
var sdkClientField =
extendedSdkType.GetField("_sdkClient", BindingFlags.Instance | BindingFlags.NonPublic);
var pipelineField = extendedSdkType.GetField("_httpPipeline", BindingFlags.Instance | BindingFlags.NonPublic);
var dsfBaseAddress = extendedSdkType.GetField("_dfsBaseAddress", BindingFlags.Instance | BindingFlags.NonPublic);
sdkClientField.SetValue(extendedSdk, client);
pipelineField.SetValue(extendedSdk, httpPipeline);
dsfBaseAddress.SetValue(extendedSdk, $"https://{accountName}.dfs.core.windows.net/");
var extendedField = AzureDataLakeStorageType.GetField("_extended", BindingFlags.Instance | BindingFlags.NonPublic);
extendedField.SetValue(dlStorage, extendedSdk);
var clientField2 = AzureDataLakeStorageType.BaseType.GetField("_client", BindingFlags.Instance | BindingFlags.NonPublic);
clientField2.SetValue(dlStorage, client);
var sasCredField = AzureDataLakeStorageType.BaseType.GetField("_sasSigningCredentials", BindingFlags.Instance | BindingFlags.NonPublic);
sasCredField.SetValue(dlStorage, credential);
var containerField = AzureDataLakeStorageType.BaseType.GetField("_containerNameToContainerClient", BindingFlags.Instance | BindingFlags.NonPublic);
containerField.SetValue(dlStorage, new ConcurrentDictionary<string, BlobContainerClient>());
- 主要言語
- C#
- スター
- 464
- フォーク
- 78
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
robinrodricks/FluentStorage のほかの issue
-
Azure Blob bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
robinrodricks/FluentStorage#179 · コメント 1 件 ·
-
question
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
robinrodricks/FluentStorage#178 · コメント 7 件 ·
-
discussion help wanted
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
robinrodricks/FluentStorage#148 ·
-
response requested Wasabi
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
robinrodricks/FluentStorage#121 · コメント 2 件 ·
-
maintainance work in progress
難易度 3/5 1〜2日 初心者へのやさしさ 54/100
robinrodricks/FluentStorage#111 · コメント 2 件 ·
robinrodricks/FluentStorage の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SixLabors/ImageSharp.Drawing#438 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
NetSparkleUpdater/NetSparkle#762 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
-
bug effort:S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
nightscout/nocturne#4563 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
Tyrrrz/YoutubeDownloader#925 ·