Skip to content

Conversation

@mrm9084
Copy link
Member

@mrm9084 mrm9084 commented Jan 6, 2023

Description

  • Removes custom exception.
  • Adds missing dictionary methods.
  • Changed KeyVaultOptions to be Keyword only.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • [X There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

@ghost ghost added the App Configuration Azure.ApplicationModel.Configuration label Jan 6, 2023
@azure-sdk
Copy link
Collaborator

API change check

APIView has identified API level changes in this PR and created following API reviews.

azure-appconfiguration-provider


def __init__(self, credential=None, secret_clients=None, secret_resolver=None):
# type: (TokenCredential, List[SecretClient], Callable) -> None
def __init__(self, *, credential=None, secret_clients=None, secret_resolver=None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to use something like:

Suggested change
def __init__(self, *, credential=None, secret_clients=None, secret_resolver=None):
def __init__(self, *, credential: Optional[TokenCredential]=None, secret_clients: Optional[List[SecretClient]]=None, secret_resolver: Optional[Callable[[str], str]]=None):

?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is updated in the other PR as it changes to multiple @overloads

"Key Vault %s does not contain secret %s"
% (key_vault_identifier.vault_url, key_vault_identifier.name)
)
return referenced_client.get_secret(key_vault_identifier.name, version=key_vault_identifier.version).value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean we want to raise ResourceNotFoundError rather than wrapping it into KeyVaultReferenceError?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the comments brought up in the review board meeting was that we shouldn't use the customer errors unless we really need one for something. So, yes in this case raise whatever error the SDK throws.

@mrm9084
Copy link
Member Author

mrm9084 commented Jan 31, 2023

See #28497 for all the new changes, including this.

@mrm9084 mrm9084 closed this Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

App Configuration Azure.ApplicationModel.Configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants