Skip to content

Align paired sync/aio clients with Azure SDK contracts - #103

Open
hallvictoria wants to merge 19 commits into
mainfrom
feature/python-sync-aio-contract
Open

hallvictoria wants to merge 19 commits into
mainfrom
feature/python-sync-aio-contract

Conversation

@hallvictoria

@hallvictoria hallvictoria commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Description

Align all 99 generated connectors with Azure SDK contracts while retaining paired synchronous root and asynchronous azure.connectors.aio clients and shared root-owned models.

Paired Generator PR

  • Generator changes required: https://msazure.visualstudio.com/One/_git/AzureUX-BPM/pullrequest/17490020
  • Generator revision used for the complete catalog: 46ee9dba871b8bb29a2c8b179042d1128d6d1656.
  • SDK review-fix revision: 1c6a985f0d52b5500d4efecdf3f503db5ce46077.
  • Upstream integration remains pending until the paired generator PR merges; this description does not claim the generator revision is on BPM master.

Changes

  • Generate matching sync/aio signatures, keyword-only optional parameters, required model fields, conditional request controls, ItemPaged/AsyncItemPaged, and retained begin_* pollers.
  • Keep mutation/action envelopes eager and preserve primitive collection item types.
  • Preserve Jira opaque nextPageToken continuation, including resumption, empty pages, token exhaustion, and isLast termination.
  • Pass the initiating request URL to sync/aio polling so initial sibling/parent-relative Locations resolve correctly.
  • Buffer completed sync responses through the public response iterator; normalize urllib3/Requests read timeouts to ServiceResponseTimeoutError.
  • Enforce default-owned Requests transport receive deadlines across status lines, headers, chunk framing, bodies, and retry delays without cancellation workers or global pool mutation. Custom sessions/transports and blocking caller callbacks must enforce their own limits, as documented.
  • Harden continuation origin validation against URL-parser/transport authority ambiguity while retaining Dataverse opaque-token routing.
  • Sweep all 99 sync and 99 aio samples: correct pager/envelope confusion and execute actual functions with empty/nonempty multi-page results while preserving eager action responses.
  • Retain Azure Core exception compatibility, lazy exports, static type discoverability, request hooks, safe retry defaults, and shared serialization contracts.

Generation provenance

All 99 connector pairs were regenerated with the revision above from a fresh live BTS4 (f34b22a3-2202-4fb1-b040-1332bd928c84) westus capture. The 99 Swagger inputs are retained outside the product repository for this validation session. A second offline generation from those inputs matched all 198 connector modules byte-for-byte (SHA-256 comparisons: zero mismatches).

This PR does not contain committed Swagger snapshots or a generation manifest. Earlier descriptions claiming those artifacts, and older generator revision references, were stale and are corrected here.

Validation before pushing

  • Full SDK CI test/coverage command: 5,694 passed, 3 warnings; 79.57% combined statement/branch coverage, exceeding the 70% gate.
  • Generator check-in plus opt-in review regression tests: 870 passed, zero failures/skips, including generated Python execution/mutation controls and compiled C# continuation deserialization.
  • Azure Core 1.30.0 compatibility slice on Python 3.12: 297 passed.
  • Repository-wide flake8 and mypy: no errors, 214 SDK source files.
  • All 198 sample API compatibility checks; actual sync/aio pager sample behavioral tests included in the full suite.
  • Strict MkDocs build and API reference checks: 99 sync/99 aio connectors plus core modules.
  • Wheel and sdist build.
  • Complete catalog offline replay/hash comparison and git diff --check.

Hosted CI is checked separately on the pushed revision; the local evidence above does not claim every hosted OS/Python matrix job has already executed.

Checklist

  • Unit tests added/updated.
  • Generated files produced by the paired generator; no hand-edited generated clients.
  • Documentation and changelog updated.
  • Review findings addressed with behavioral regressions.

@hallvictoria
hallvictoria requested a review from a team as a code owner October 12, 2026 16:14
@hallvictoria
hallvictoria force-pushed the feature/python-sync-aio-contract branch from 86d43e0 to 21c4d5c Compare October 12, 2026 16:23
@hallvictoria hallvictoria changed the title Add paired synchronous and asynchronous connector clients Add paired sync/aio clients and Location-based LRO pollers Oct 12, 2026
@hallvictoria hallvictoria changed the title Add paired sync/aio clients and Location-based LRO pollers Align paired sync/aio clients with Azure SDK contracts Oct 12, 2026

@daviburg David Burg (daviburg) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[Dobby] Connector SDK review: two medium-priority runtime defects reproduced on the current head; see the separate inline comments. The earlier constructor-timeout forwarding finding no longer reproduces after the latest SDK update, so it is not included as an open finding.

Comment thread src/azure/connectors/sdk/http_client.py Outdated
Comment thread src/azure/connectors/sdk/_polling.py Outdated

@daviburg David Burg (daviburg) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[Dobby] Comprehensive paired Connector SDK review

Assessment: changes are needed before merge. This consolidates independent GPT-6.1 Sol, Gemini 4 Argon, and Grok 4.7 reviews, followed by runtime reproductions and generator/artifact checks. The findings are based on behavior and source evidence, not model agreement alone.

Reviewed revisions: Python SDK commit 0f4c68b and BPM generator commit b9c9fd2, iteration 23 of paired BPM PR 17490020.

Six findings, posted individually on the owning repository

# Priority Owner Finding
1 P1 This SDK Default synchronous response buffering raises after consuming a normal fixed-length successful response. See inline comment.
2 P2 BPM generator Jira issue paging discards opaque nextPageToken and silently returns only page one. Individual generator finding.
3 P2 BPM generator Newly inferred .NET Jira pagers bind to a synthetic nextLink, not the actual nextPage. Individual generator finding.
4 P2 This SDK Migrated synchronous examples still call dictionary .get(...) on ItemPaged. See inline comment.
5 P2 This SDK Synchronous response-header loading can exceed the documented total timeout. See inline comment.
6 P2 This SDK The initial path-relative LRO Location lacks the initiating request URI as its resolution base. See inline comment.

The four SDK findings have separate inline comments in this review. Generator findings are anchored on BPM rather than duplicated on generated client files.

Validation actually performed

  • Rebuilt the latest BPM compiler and ran its exact check-in test filter: 857 passed.
  • Full local Python suite: 4,964 passed, 1 failed. The slow-drip timeout regression leaked raw urllib3.exceptions.ReadTimeoutError; an isolated six-run repeat failed once and passed five times. This is not a clean full-suite result.
  • Focused sync-runtime/polling slice: 32 passed. Declared Azure Core 1.30.0 runtime/polling/LRO slice: 34 passed.
  • Flake8, mypy across 214 source files, strict MkDocs/API-reference validation, and wheel packaging passed. All 198 static sample-compatibility checks passed, but executing the two actual Jira examples exposed finding 4.
  • Independently captured live westus Swagger into a new empty cache and replayed generation with outbound ARM access blocked. All 198 connector modules matched this SDK head byte-for-byte with BPM b9c9fd2; all 100 captured response hashes remained unchanged. A missing-cache negative control failed to connect through the blocked proxy. This proves current reproducibility, not the author's historical input snapshot.
  • Regenerated matching .NET output from the same Swagger with both the PR merge-base and current generator. The Jira continuation regression in finding 3 is introduced. Inherited dangling discovery/type-collapse detector results were not reported as new defects.

Generator integration and provenance gates

  • Current reproducibility: passed against b9c9fd2; reviewed-source coverage: passed for the paired generator PR.
  • Upstream integration: pending because the BPM PR remains active and unmerged.
  • The PR descriptions need correction: this SDK description declares generator b7a57c9, whose output differs in all 198 modules, and both summaries still claim committed Swagger snapshots/manifest artifacts that were removed. The current catalog already matches b9c9fd2; this is stale provenance prose, not evidence of hand-edited connector files.

Earlier feedback

Constructor timeout forwarding is fixed. Subsequent sibling-relative and parent-relative polling Location updates are also fixed. Finding 6 concerns the distinct initial Location base. The synchronous timeout fix remains incomplete and introduced the normal-response failure described in finding 1.

No approval, merge, or code change is implied by this COMMENT review. The six findings remain open for the author to address.

Comment thread src/azure/connectors/sdk/http_client.py Outdated
Comment thread samples/sample_connector_usage/sample_connector_usage_jira.py Outdated
Comment thread src/azure/connectors/sdk/http_client.py Outdated
Comment thread src/azure/connectors/sdk/_polling.py Outdated

This branch has not been deployed

No deployments
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.

2 participants