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

[Confidential Ledger] GA Data Plane SDK #24900

Merged
merged 147 commits into from
Jul 19, 2022
Merged

Conversation

lynshi
Copy link
Contributor

@lynshi lynshi commented Jun 17, 2022

Description

This introduces the GA version of the Data Plane SDK for Confidential Ledger. Besides retagging for preview to stable, the Swagger has changed somewhat; for example, the subLedgerId field has been renamed to collectionId. The generated code is now generated by DPG, leading to the removal of models. Client methods now return JSON directly.

This also fixes #23356 as all models have been removed with DPG generation.

Live testing of tests and samples is also included now.

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.
  • 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.

Copy link
Contributor

@iscai-msft iscai-msft left a comment

Choose a reason for hiding this comment

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

looking pretty good!

@lynshi
Copy link
Contributor Author

lynshi commented Jul 14, 2022

/azp run python - confidentialledger - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lynshi
Copy link
Contributor Author

lynshi commented Jul 15, 2022

/azp run python - confidentialledger - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lynshi
Copy link
Contributor Author

lynshi commented Jul 15, 2022

/azp run python - confidentialledger - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lynshi
Copy link
Contributor Author

lynshi commented Jul 16, 2022

/azp run python - confidentialledger - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lynshi
Copy link
Contributor Author

lynshi commented Jul 18, 2022

/azp run python - confidentialledger - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@iscai-msft iscai-msft left a comment

Choose a reason for hiding this comment

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

looks good to me, congrats @lynshi for all of your hard work!

@lmazuel lmazuel merged commit ffe4d96 into Azure:main Jul 19, 2022
iscai-msft added a commit that referenced this pull request Jul 20, 2022
…into version_tolerant_models

* 'main' of https://github.com/Azure/azure-sdk-for-python: (259 commits)
  Sync eng/common directory with azure-sdk-tools for PR 3702 (#25309)
  remove continuation_token kwarg (#25298)
  Print additional result summary formats to pipelines UI (#25306)
  Increment package version after release of azure-ai-language-questionanswering (#25303)
  [textanalytics] refactor pollers + add TA poller protocol (#25275)
  Remove needs-triage label if it is assigned (#25302)
  Update casing for 'verison' (#25197)
  don't drop 3.6 yet (#25293)
  always check proxy availability (#25291)
  bump python version in autorest pipeline check (#25288)
  add needs-triage labeler (#25289)
  [Confidential Ledger] GA Data Plane SDK (#24900)
  [QA] support AAD auth (#25256)
  Fixed the var name (#25277)
  Storage File Datalake test (test_list_paths_with_max_per_page) improvement (#25240)
  [formrecognizer] Add a type for target authorization for copy requests (#25268)
  disable labeler (#25278)
  [textanalytics] use commits for swagger in generation readme (#25246)
  [textanalytics] add multi label classify bespoke method (#25009)
  [Storage] Migrate `test_blob_api_version` and `test_blob_client` to test proxy (#25272)
  ...
jeremydvoss pushed a commit to jeremydvoss/azure-sdk-for-python that referenced this pull request Jul 21, 2022
* remove duplicate typing

* update version and changelog

* added confidentialledger to tox list and fix issues

* always import typing

* update date in changelog

* fix trailing whitespace

* remove TransactionStatus model

* align get_ledger_entry backoff config api with azure defaults

* update typing for ConfidentialLedgerCertificateCredential

* dpg generation for new version

* small updates

* add pytest configuration

* wip

* the tests ran

* tested identity service client and added test for add cert-based user

* change identity in test

* passed non-async tests

* pass all tests and make recordings

* totally generate using the old way

* update swagger for stable api version

* generate using stable and remove auth

* update ConfidentialLedgerClient init

* patch async init

* overrode all expected client operations

* overrode async

* remove accidental file

* attr -> json

* fix typos

* add https://

* fix imports and credential type checking

* fix method name

* credential to args

* black

* fix some tests

* updated async tests

* fixed entry for range query

* generate identity service so it does not get overriden

* skip url encoding of user id

* generate with autorest python 5.17.0

* pass identity service tests

* remove api version from tests

* build in typical identity service uri

* regenerated

* update identity

* Union[IO, JSON]

* set content-type for create user and fix transaction status check in tests

* fix tests

* fix user tests

* basic readme for samples

* follow retry policy parameter names

* remove post and wait

* remove post_ledger_entry_wait_for_commit from test

* Revert "remove post_ledger_entry_wait_for_commit from test"

This reverts commit 3e4ad98.

* Revert "remove post and wait"

This reverts commit 5cb5b0b.

* add cert user before starting

* add test config files

* remove unnecessary environment vars (set by the ARM template)

* fix non-async test

* GetLedgerEntryPollingMethod

* StatePollingMethod

* complete poller nonasync

* AsyncLroPoller returned

* tests to lro

* tests use pollers

* update arm template

* rename module and add sample

* update readme up to examples

* update readme

* list ledger entries readme and sample

* finish readme

* finish samples

* update CHANGELOG

* retrieve cert at startup

* new recordings for identity service

* check collection id

* list collections

* address pr comments

* rename resource group variable per live test setup

* ran black

* remove ARM template

* add user management samples

* regenerate with fixed swagger

* operations mixin for identity client

* latest tests and recordings

* use confidential ledger id

* updated recordings

* contextmanager for async samples

* update changelog per comments

* put imports in all readme samples

* remove operation prefix in Swagger and regenerate

* remove some examples from readme and start samples section

* samples skeleton

* run list_ledger_entries samples

* updated manage users sample

* get receipt sample

* write to ledger

* use collections

* service verification samples

* fix collections signature

* add aiohttp to requirements

* use uniqueString for ledger name

* set resource location

* update setup.py based on example

* suppress credscan for test secret

* fix super and credential attr

* omit in toc is causing errors and also apparently not necessary locally anymore

* update shared requirements

* pylint fixes

* no more self.assert

* fix super

* deduplicate pollingmethod

* test fixes

* update ledger name

* shorten range query test and add delay to add user

* greatly shorten range query test

* redo recordings

* add known word to cspell

* add PostTestSteps

* reduce flakiness

* add envvars

* remove PostTestSteps

* address edge cases in tests

* autorest 6.0.1

* regenerate with batch

* rerecord

* add comment

* better handling of cls in begin_post_ledger_entry

* fix typo

* fetch TLS certificate automagically

* updated tests and README for new convenience TLS cert fetching

* pass kwargs

* fix credential typo

* identity_service -> certificate

* rename endpoint params

* regen after review and passed tests and samples

* regenerated with latest swagger

* updated per pr comments

* fix pylint

* use tempfile.TemporaryDirectory

* retry ResourceNotFoundError in poller

* address review comments

* uupdate release date
@lynshi lynshi deleted the lyshi/ga-changes branch August 2, 2022 18:05
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.

[confidentialledger] mypy: function has duplicate type signatures
6 participants