Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
outputs:
pr_info: ${{ steps.pr.outputs.result }}
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: 'Download Artifact'
uses: actions/github-script@v6
Expand Down
8 changes: 4 additions & 4 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ dependencies:
- strawberry-graphql[fastapi,pydantic]==0.194.4
- web3==6.5.0
- twine==4.0.2
- delta-sharing-python==0.7.4
- polars==0.18.8
- moto[s3]==4.1.14
- pip:
- dependency-injector==4.41.0
- azure-functions==1.15.0
- nest_asyncio==1.5.6
- hvac==1.1.1
- langchain==0.0.247
- deltalake==0.10.0
- moto[s3]==4.1.13
- build==0.10.0
- polars==0.18.8
- delta-sharing==0.7.3
- deltalake==0.10.1

3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
"hvac==1.1.1",
"azure-keyvault-secrets==4.7.0",
"web3==6.5.0",
"polars==0.18.8"
"polars[deltalake]==0.18.8",
"delta-sharing==0.7.4"
]

EXTRAS_DEPENDENCIES: dict[str, list[str]] = {
Expand Down
4 changes: 2 additions & 2 deletions src/sdk/python/rtdip_sdk/pipelines/secrets/azure_key_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def settings() -> dict:

def _get_akv_client(self):
return SecretClient(
vault_url=self.vault,
vault_url="https://{}.vault.azure.net".format(self.vault),
credential=self.credential,
**self.kwargs
)
Expand All @@ -71,7 +71,7 @@ def get(self):
Retrieves the secret from the Azure Key Vault
'''
response = self.client.get_secret(name=self.key)
return response
return response.value

def set(self):
'''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def execute(self) -> Tuple[Libraries, dict]:
(issubclass(class_check, UtilitiesInterface) and class_check != UtilitiesInterface)
):
component_list.append(cls[1])
print(cls[0])

task_libraries = Libraries()
task_libraries.get_libraries_from_components(component_list)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
from src.sdk.python.rtdip_sdk.pipelines.secrets.azure_key_vault import AzureKeyVaultSecrets
from src.sdk.python.rtdip_sdk.pipelines._pipeline_utils.models import Libraries, PyPiLibrary

class MockSecretValue():
value = "test"

def test_azure_key_vault_secret_setup(mocker: MockerFixture):
azure_key_vault = AzureKeyVaultSecrets(vault="akv-vault-url", credential=object(), key="test")
assert azure_key_vault.system_type().value == 1
Expand All @@ -29,7 +32,7 @@ def test_azure_key_vault_secret_setup(mocker: MockerFixture):
assert isinstance(azure_key_vault.settings(), dict)

def test_azure_key_vault_secrets_get(mocker: MockerFixture):
mocker.patch("azure.keyvault.secrets.SecretClient.get_secret", return_value="test")
mocker.patch("azure.keyvault.secrets.SecretClient.get_secret", return_value=MockSecretValue())

azure_key_vault = AzureKeyVaultSecrets(vault="akv-vault-url", credential=object(), key="vault-key")

Expand Down