You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Migrate Azure Blob adapter from abandoned SDK to azure-oss/storage
Microsoft abandoned the microsoft/azure-storage-* libraries with no
Composer replacement. Migrate the Azure Blob sync adapter, collector and
file classes from MicrosoftAzure\Storage\Blob\BlobRestProxy to the
maintained azure-oss/storage SDK (BlobServiceClient / BlobContainerClient
/ BlobClient).
- Sync\AzureBlob: build a BlobContainerClient from the connection string;
use exists()/create() instead of listContainers()/createContainer();
upload via getBlobClient()->upload().
- Collector\AzureBlob: list via BlobContainerClient::getBlobs() (the SDK
paginates transparently, so the manual continuation-token loop is gone);
the collector now receives the container client directly.
- File\AzureBlob: read name/size/last-modified from the Blob model's
readonly properties; delete via getBlobClient()->delete().
The azure-oss client classes are final and cannot be mocked, so the tests
drive the real adapter logic through small seams (createClient, listBlobs,
deleteBlob, ...) and build the offline BlobContainerClient and Blob models
directly. Container existence, the create/skip-create branch, upload,
exception wrapping, blob listing/filtering and deletion are covered.
Also update the phar build (build.xml, build/phar-manifest.php) to bundle
azure-oss/storage and its dependencies instead of microsoft/azure-storage-*.
Signed-off-by: Sebastian Mendel <sebastian.mendel@netresearch.de>
0 commit comments