Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Unit tests for Azure #529

Merged
merged 7 commits into from
Sep 10, 2022
Merged

[CI] Unit tests for Azure #529

merged 7 commits into from
Sep 10, 2022

Conversation

parasj
Copy link
Contributor

@parasj parasj commented Sep 9, 2022

Continuation of #525

@parasj
Copy link
Contributor Author

parasj commented Sep 9, 2022

@abiswal2001 This PR fails with a single Azure test as follows:

pytest tests/unit_azure                                                                                                                                                                                                                                                                                                       ✘ 130 
=================================================================================================================================================================== test session starts ====================================================================================================================================================================
platform darwin -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /Users/paras/code/skylark
plugins: anyio-3.5.0
collected 1 item                                                                                                                                                                                                                                                                                                                                           

tests/unit_azure/test_azure_blob_interface.py F                                                                                                                                                                                                                                                                                                      [100%]

========================================================================================================================================================================= FAILURES =========================================================================================================================================================================
__________________________________________________________________________________________________________________________________________________________________ test_azure_singlepart ___________________________________________________________________________________________________________________________________________________________________

    def test_azure_singlepart():
        bucket_name = f"test{str(uuid.uuid4()).replace('-', '')[-20:]}/{str(uuid.uuid4()).replace('-', '')}"
>       assert interface_test_framework("azure:eastus", bucket_name, False, test_delete_bucket=True)

tests/unit_azure/test_azure_blob_interface.py:9: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/interface_util.py:29: in interface_test_framework
    interface.upload_object(fpath, obj_name)
skyplane/obj_store/azure_blob_interface.py:153: in upload_object
    blob_client = self._run_azure_op_with_retry(
skyplane/obj_store/azure_blob_interface.py:113: in _run_azure_op_with_retry
    return fn()
/opt/homebrew/Caskroom/miniconda/base/lib/python3.8/site-packages/azure/core/tracing/decorator.py:73: in wrapper_use_tracer
    return func(*args, **kwargs)
/opt/homebrew/Caskroom/miniconda/base/lib/python3.8/site-packages/azure/storage/blob/_container_client.py:978: in upload_blob
    blob.upload_blob(
/opt/homebrew/Caskroom/miniconda/base/lib/python3.8/site-packages/azure/core/tracing/decorator.py:73: in wrapper_use_tracer
    return func(*args, **kwargs)
/opt/homebrew/Caskroom/miniconda/base/lib/python3.8/site-packages/azure/storage/blob/_blob_client.py:716: in upload_blob
    return upload_block_blob(**options)
/opt/homebrew/Caskroom/miniconda/base/lib/python3.8/site-packages/azure/storage/blob/_upload_helpers.py:168: in upload_block_blob
    process_storage_error(error)
/opt/homebrew/Caskroom/miniconda/base/lib/python3.8/site-packages/azure/storage/blob/_shared/response_handlers.py:181: in process_storage_error
    exec("raise error from None")   # pylint: disable=exec-used # nosec
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

>   ???
E   azure.core.exceptions.HttpResponseError: This request is not authorized to perform this operation using this permission.
E   RequestId:a7f51e99-b01e-002f-7e11-c4542d000000
E   Time:2022-09-09T06:03:22.6483764Z
E   ErrorCode:AuthorizationPermissionMismatch
E   Content: <?xml version="1.0" encoding="utf-8"?><Error><Code>AuthorizationPermissionMismatch</Code><Message>This request is not authorized to perform this operation using this permission.
E   RequestId:a7f51e99-b01e-002f-7e11-c4542d000000
E   Time:2022-09-09T06:03:22.6483764Z</Message></Error>

<string>:1: HttpResponseError
------------------------------------------------------------------------------------------------------------------------------------------------------------------- Captured stderr call -------------------------------------------------------------------------------------------------------------------------------------------------------------------
23:02:58 [DEBUG] Creating storage account test4060853cf871d88d2df7
23:03:20 [DEBUG] Creating container 18603a38f04e4884828584071b787bf0
================================================================================================================================================================= short test summary info ==================================================================================================================================================================
FAILED tests/unit_azure/test_azure_blob_interface.py::test_azure_singlepart - azure.core.exceptions.HttpResponseError: This request is not authorized to perform this operation using this permission.
==================================================================================================================================================================== 1 failed in 27.67s ====================================================================================================================================================================

@parasj parasj changed the title [CI] Enable Azure CI tests [CI] Unit tests for Azure Sep 9, 2022
commit 8a30e2f
Merge: 4a4ee44 3767b2e
Author: Paras Jain <[email protected]>
Date:   Sat Sep 10 10:01:17 2022 -0700

    Merge branch 'main' into ci/enable_azure

commit 4a4ee44
Author: Paras Jain <[email protected]>
Date:   Thu Sep 8 23:03:42 2022 -0700

    Test fails due to permissions error

commit c7fce50
Author: Paras Jain <[email protected]>
Date:   Thu Sep 8 23:01:58 2022 -0700

    Enable Azure CI tests
@parasj parasj marked this pull request as ready for review September 10, 2022 19:14
@parasj parasj merged commit 4305a4f into main Sep 10, 2022
@parasj parasj deleted the ci/enable_azure branch September 10, 2022 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant