Skip to content

Commit 0213a2d

Browse files
committed
ref(azure): revert to using wal-e versions of azure and azure-storage-blob
Signed-off-by: Cryptophobia <aouzounov@gmail.com>
1 parent 004f62f commit 0213a2d

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ RUN mkdir -p $WALE_ENVDIR $PGDATA_RECOVERY \
1919
ca-certificates \
2020
python3 \
2121
py-pip \
22-
&& pip3 install --upgrade pip setuptools \
22+
&& pip3 install --upgrade pip setuptools wheel \
2323
&& pip install --disable-pip-version-check --no-cache-dir \
2424
psycopg2-binary==2.8.4 \
2525
envdir==1.0.1 \
2626
wal-e[aws,azure,google,swift]==1.1.1 \
2727
gcloud==0.18.3 \
2828
oauth2client==4.1.3 \
29-
azure-storage-blob==12.5.0 \
29+
azure==3.0.0 \
30+
azure-storage-blob==1.1.0 \
3031
&& apk del .build-deps \
3132
&& rm -rf /var/cache/apk/*
3233

contrib/ci/test-upgrade.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ kill-containers "${PG_JOB}"
123123
test-upgrade-from postgres:11-alpine
124124
kill-containers "${PG_JOB}"
125125

126-
test-upgrade-from-wal hephy/postgres:v2.7.1
126+
test-upgrade-from-wal hephy/postgres:v2.7.5
127127

128128
puts-step "tests PASSED!"
129129
exit 0

rootfs/bin/create_bucket

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ from boto.s3.connection import S3Connection, OrdinaryCallingFormat
1111
from oauth2client.service_account import ServiceAccountCredentials
1212
from gcloud.storage.client import Client
1313
from gcloud import exceptions
14-
from azure.storage.blob import BlobServiceClient
14+
from azure.storage.blob import BlockBlobService
1515

1616

1717
def bucket_exists(conn, name):
@@ -63,12 +63,11 @@ elif os.getenv('DATABASE_STORAGE') == "gcs":
6363
if not exists:
6464
conn.create_bucket(bucket_name)
6565

66-
# WIP: Currently broken and needs to be update using the new BlobServiceClient
66+
# WIP: Needs to be updated to use new client version and new auth method with azure_storage_conn_string at some point
67+
# Currently pegged to the wal-e azure client and blob-storage versions in Dockerfile
6768
elif os.getenv('DATABASE_STORAGE') == "azure":
68-
connection_string = os.getenv("AZURE_STORAGE_CONNECTION_STRING")
69-
azure_blob_service_client = BlobServiceClient.from_connection_string(connection_string)
70-
71-
azure_blob_service_client.create_container(bucket_name)
69+
conn = BlockBlobService(account_name=os.getenv('WABS_ACCOUNT_NAME'), account_key=os.getenv('WABS_ACCESS_KEY'))
70+
conn.create_container(bucket_name)
7271

7372
elif os.getenv('DATABASE_STORAGE') == "swift":
7473
conn = swiftclient.Connection(

0 commit comments

Comments
 (0)