Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

Refactor AzureBlob #160

Open
Open
@bruno-brant

Description

@bruno-brant

Class AzureBlob has some issues that need to be addressed in order to raise the bar.

AzureBlob.Container.set has major side effects

A property shouldn't have side effects or perform some deep computation. It also calls async methods it doesn't waits on:

https://github.com/Avanade/Liquid-Application-Framework/blob/3db86aa5390498bc253d7599f0a44f922afc40dc/src/Liquid.OnAzure/Storages/AzureBlob.cs#L30-L32

Transform unreadable ternary into a proper switch-case

https://github.com/Avanade/Liquid-Application-Framework/blob/3db86aa5390498bc253d7599f0a44f922afc40dc/src/Liquid.OnAzure/Storages/AzureBlob.cs#L34-L38

It forcefully creates a container

There's no flag to control whether CreateIfNotExistsAsync is called in this method:

https://github.com/Avanade/Liquid-Application-Framework/blob/3db86aa5390498bc253d7599f0a44f922afc40dc/src/Liquid.OnAzure/Storages/AzureBlob.cs#L30

Remove succeeds even if the file doesn't exists

The method Remove hurst the principle of least surprise by calling DeleteIfExists, meaning that callers won't know if some error happens.

https://github.com/Avanade/Liquid-Application-Framework/blob/d3c19c13217053a7fa2ac0072fe9330b626e3a76/src/Liquid.OnAzure/Storages/AzureBlob.cs#L109-L114

HealthCheck is completely broken

More info on #165.

Metadata

Metadata

Assignees

Labels

complexity:highThe complexity of the issue is highenhancementNew feature or requestsize:largeThe size of the issue is large

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions