Skip to content

Conversation

@zhaodongwang-msft
Copy link
Collaborator

Did some manual local test, 3 runs:
without header
total create_entity call time: 41.047, 46.856, 86.077
_wait_for_entity_ready call inside create_entity time: 3.432, 10.084, 40.917 (total attempts are 2, 3, 5, respectively)

with header
total create_entity call time: 27.162, 31.084, 32.804
_wait_for_entity_ready call inside create_entity time: 0.978, 1.318, 2.118 (all 1 attempt)

Copilot summary:
This pull request updates the entity retrieval logic in the src/dataverse_sdk/odata.py module to improve data consistency when waiting for an entity to be ready. The main change is the introduction of strong consistency headers when polling for entity readiness.

Improvements to entity polling consistency:

  • The _get_entity_by_schema method now accepts an optional headers parameter, allowing custom HTTP headers to be passed to the request.
  • In the _wait_for_entity_ready method, requests to retrieve the entity now include a "Consistency": "Strong" header to ensure the latest data is fetched during polling.

Copilot AI review requested due to automatic review settings November 7, 2025 00:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds support for strong consistency headers when polling for entity readiness in Dataverse metadata operations.

  • Adds an optional headers parameter to _get_entity_by_schema method to allow custom headers in metadata queries
  • Updates _wait_for_entity_ready to use Consistency: Strong headers when polling for newly created entities

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tpellissier-msft tpellissier-msft merged commit 847d122 into main Nov 7, 2025
11 checks passed
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.

3 participants