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

[v1.0-rc/bug] Bug on the abs source type. Error converting ClientSecretCredential into a string. #12595

Open
fmoreind opened this issue Feb 11, 2025 · 1 comment
Assignees
Labels
bug Bug report datahub-v1.0-rc Issue or PR related to DataHub v1.0 Release Candidates

Comments

@fmoreind
Copy link

Describe the bug
In the Azure Blob Storage source type, when using the Azure connection configuration with a Service entity (tenant_id, client_id and client_secret) instead of SAS_token, an error is generated when converting the ClientSecretCredential class to string type when it should be an object. See also BlobServiceClient class

Since the ClientSecretCredential is class type object, imported from Azure SDK, this cannot be converted into a string.

See get_credentials and get_blob_service_client functions in azure_common.

To Reproduce
Steps to reproduce the behavior:

  1. Generate a .yaml recipe type abs with azure_config.client_secret. Azure App Registry should be configured as documentation.
  2. Execute the recipe.yml file in VSCode or cloud.
  3. See error

Expected behavior
The expected behaviour is the same succeded message as the azure_config.token_sas.

In fact, if I change the azure_common.py replacing:

    def get_blob_service_client(self):
        return BlobServiceClient(
            account_url=f"https://{self.account_name}.blob.core.windows.net",
            credential=f"{self.get_credentials()}",
        )

For this:

    def get_blob_service_client(self):
        return BlobServiceClient(
            account_url=f"https://{self.account_name}.blob.core.windows.net",
            credential=self.get_credentials(),
        )

The behaviour is shown in the below screenshots.

Screenshots and/or Screen Recordings
Fail message:

Image

Success meassage after change get_blob_service_client function:

Image

System details (please complete the following information):

  • DataHub Version Tag: v1.0-rc1
  • OS: iOS
  • Browser: chrome

Additional context
I've been comparing with oldest versions and I founf out e.g.v0.9.6.1 and it's not been converted into a string.

@fmoreind fmoreind added bug Bug report datahub-v1.0-rc Issue or PR related to DataHub v1.0 Release Candidates labels Feb 11, 2025
@tonysanchez64
Copy link

I have the same issue, thank you for bringing it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report datahub-v1.0-rc Issue or PR related to DataHub v1.0 Release Candidates
Projects
None yet
Development

No branches or pull requests

5 participants