Conversation
| _RETRY_LIMIT = 10 | ||
| _DEFAULT_AUTO_FLUSH_INTERVAL = 60 | ||
| _DEFAULT_BATCH_SIZE = 100 | ||
| _MAX_RETRY_COUNT = 3 |
There was a problem hiding this comment.
tiniest nit: can you also call this _DEFAULT_MAX_RETRY_COUNT
| assert client._window == 100 | ||
| assert client._auto_flush | ||
| await client.close() | ||
| async with SearchIndexDocumentBatchingClient("endpoint", "index name", CREDENTIAL, window=100) as client: |
There was a problem hiding this comment.
It doesn't look like you have tests for the new kwargs (i.e. error_callback, progress_callback etc). can you add tests for these?
| **Breaking Changes** | ||
|
|
||
| - Stopped supporting `window` kwargs for `SearchIndexDocumentBatchingClient` | ||
| - Splitted kwarg `hook` into `new_callback`, `progress_callback`, `error_callback`, `remove_callback` for `SearchIndexDocumentBatchingClient` |
There was a problem hiding this comment.
We continue to use the suffix _hook or the prefix on_ to represent callbacks in other SDKs - are we able to align?
e.g.
- storage blobs
on_error - event hubs
on_error/on_partition_initializeetc - In Datalake we use the
_hooksuffix when the callback handles a few different operations (e.g. not just errors).
There was a problem hiding this comment.
Update changelog to reflect new on_ prefix to callbacks
| **Breaking Changes** | ||
|
|
||
| - Stopped supporting `window` kwargs for `SearchIndexDocumentBatchingClient` | ||
| - Splitted kwarg `hook` into `new_callback`, `progress_callback`, `error_callback`, `remove_callback` for `SearchIndexDocumentBatchingClient` |
There was a problem hiding this comment.
Update changelog to reflect new on_ prefix to callbacks
| """ | ||
| actions = self._index_documents_batch.add_upload_actions(documents) | ||
| self._new_callback(actions) | ||
| self._new_action_callback(actions) |
There was a problem hiding this comment.
nit: i think it would be more clear if the private variables tracking the on_ hooks were named the same as what users would pass in (in this case, self._on_new)
…into fr-business-cards * 'master' of https://github.com/Azure/azure-sdk-for-python: (71 commits) move the environment prep above the tooling that needs it (#14246) Increment version for appconfiguration releases (#14245) Azure Communication Service - Phone Number Administration (#14237) [text analytics] fix query param in cli call to get endpoint (#14243) Resolve Failing Documentation Build for azure-mgmt-core (#14239) Add code reviewers (#14229) [ServiceBus] make amqp_message properties read-only (#14095) [ServiceBus]remove topic parameter object settability (#14116) app config owner (#12986) [KeyVault] Handle Role Definition UUID Name Internally (#14218) Increment version for storage releases (#14224) Update Key Vault changelogs for October release (#14226) [ServiceBus] CI Test hotfixes (#14195) [text analytics] regen TA with GA autorest (#14215) [Storage][STG74]ChangeLog (#14192) fixes python 2.7 issue with unicode and strings again! (#14216) Feature/storage stg74 (#14175) Update communication pacakges to version b2 (#14209) [KeyVault] Add Status Methods to Query Backup and Restore Operations (#14158) Update buffered sender (#13851) ...
windowkwargs forSearchIndexDocumentBatchingClienthookintonew_callback,progress_callback,error_callback,remove_callbackforSearchIndexDocumentBatchingClientauto_flush_intervalsupport forSearchIndexDocumentBatchingClientmax_retry_countsupport forSearchIndexDocumentBatchingClient