This commit is contained in:
Dale Myers 2024-06-04 11:07:06 +01:00
Родитель 3b2b302645
Коммит 1f3b3a0844
4 изменённых файлов: 21 добавлений и 25 удалений

Просмотреть файл

@ -9,7 +9,7 @@ import os
from typing import Any, Iterator
import urllib.parse
from azure.storage.blob import BlobType, ContainerClient
from azure.storage.blob import BlobServiceClient
import deserialize
import appcenter.constants
@ -405,14 +405,10 @@ class AppCenterCrashesClient(AppCenterDerivedClient):
container, blob_name = path.split("/")
connection_string = f"BlobEndpoint={url_components.scheme}://{url_components.netloc};"
connection_string += f"SharedAccessSignature={url_components.query}"
service = ContainerClient.from_connection_string(connection_string, container)
service.upload_blob(
blob_name,
symbols_file,
BlobType.BLOCKBLOB,
overwrite=True,
progress_hook=progress_callback,
)
service = BlobServiceClient.from_connection_string(connection_string)
blob_client = service.get_blob_client(container, blob_name, None)
blob_client.upload_blob(symbols_file, progress_hook=progress_callback, overwrite=True)
commit_response = self.commit_symbol_upload(
org_name=org_name,

28
poetry.lock сгенерированный
Просмотреть файл

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
[[package]]
name = "astroid"
@ -101,13 +101,13 @@ uvloop = ["uvloop (>=0.15.2)"]
[[package]]
name = "certifi"
version = "2024.2.2"
version = "2024.6.2"
description = "Python package for providing Mozilla's CA Bundle."
optional = false
python-versions = ">=3.6"
files = [
{file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"},
{file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"},
{file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"},
{file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"},
]
[[package]]
@ -713,13 +713,13 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "virtualenv"]
[[package]]
name = "requests"
version = "2.32.2"
version = "2.32.3"
description = "Python HTTP for Humans."
optional = false
python-versions = ">=3.8"
files = [
{file = "requests-2.32.2-py3-none-any.whl", hash = "sha256:fc06670dd0ed212426dfeb94fc1b983d917c4f9847c863f313c9dfaaffb7c23c"},
{file = "requests-2.32.2.tar.gz", hash = "sha256:dd951ff5ecf3e3b3aa26b40703ba77495dab41da839ae72ef3c8e5d8e2433289"},
{file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"},
{file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"},
]
[package.dependencies]
@ -782,13 +782,13 @@ files = [
[[package]]
name = "types-requests"
version = "2.32.0.20240523"
version = "2.32.0.20240602"
description = "Typing stubs for requests"
optional = false
python-versions = ">=3.8"
files = [
{file = "types-requests-2.32.0.20240523.tar.gz", hash = "sha256:26b8a6de32d9f561192b9942b41c0ab2d8010df5677ca8aa146289d11d505f57"},
{file = "types_requests-2.32.0.20240523-py3-none-any.whl", hash = "sha256:f19ed0e2daa74302069bbbbf9e82902854ffa780bc790742a810a9aaa52f65ec"},
{file = "types-requests-2.32.0.20240602.tar.gz", hash = "sha256:3f98d7bbd0dd94ebd10ff43a7fbe20c3b8528acace6d8efafef0b6a184793f06"},
{file = "types_requests-2.32.0.20240602-py3-none-any.whl", hash = "sha256:ed3946063ea9fbc6b5fc0c44fa279188bae42d582cb63760be6cb4b9d06c3de8"},
]
[package.dependencies]
@ -796,13 +796,13 @@ urllib3 = ">=2"
[[package]]
name = "typing-extensions"
version = "4.12.0"
version = "4.12.1"
description = "Backported and Experimental Type Hints for Python 3.8+"
optional = false
python-versions = ">=3.8"
files = [
{file = "typing_extensions-4.12.0-py3-none-any.whl", hash = "sha256:b349c66bea9016ac22978d800cfff206d5f9816951f12a7d0ec5578b0a819594"},
{file = "typing_extensions-4.12.0.tar.gz", hash = "sha256:8cbcdc8606ebcb0d95453ad7dc5065e6237b6aa230a31e81d0f440c30fed5fd8"},
{file = "typing_extensions-4.12.1-py3-none-any.whl", hash = "sha256:6024b58b69089e5a89c347397254e35f1bf02a907728ec7fee9bf0fe837d203a"},
{file = "typing_extensions-4.12.1.tar.gz", hash = "sha256:915f5e35ff76f56588223f15fdd5938f9a1cf9195c0de25130c627e4d597f6d1"},
]
[[package]]
@ -825,4 +825,4 @@ zstd = ["zstandard (>=0.18.0)"]
[metadata]
lock-version = "2.0"
python-versions = "^3.10"
content-hash = "8e659be42e55f9076b1089052896f2d1137b14253082293482b743af1aa896d0"
content-hash = "bbf4a882239856fc9ff52584822d1f8b605390a0dab5bd9a9743b687f93fe449"

Просмотреть файл

@ -33,7 +33,7 @@ azure-storage-blob = "^12.13.0"
deserialize = "^2.0.1"
requests = "^2.32.0"
tenacity = "^8.2.2"
types-requests = "^2.32.0.2"
types-requests = "^2.32.0.20240602"
[tool.poetry.dev-dependencies]
black = "24.4.2"

Просмотреть файл

@ -264,7 +264,7 @@ def test_symbol_upload(org_name: str, token: str):
client = appcenter.AppCenterClient(access_token=token)
client.crashes.upload_symbols(
org_name=org_name,
app_name="UploadTestApp",
app_name="Test",
version="0.1",
build_number="123",
symbols_path=symbols_path,