Skip to content

Staging signoff fixes #42266

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

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Conversation

tvaron3
Copy link
Member

@tvaron3 tvaron3 commented Jul 29, 2025

Description

  • Changed tests to run on locations found on the account
  • Fixed bug where metadata requests were not honoring excluded locations in certain scenarios. Session container, certain queries, PPCB.

@tvaron3
Copy link
Member Author

tvaron3 commented Jul 30, 2025

/azp run python - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tvaron3
Copy link
Member Author

tvaron3 commented Jul 30, 2025

/azp run python - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tvaron3
Copy link
Member Author

tvaron3 commented Jul 31, 2025

/azp run python - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tvaron3
Copy link
Member Author

tvaron3 commented Jul 31, 2025

/azp run python - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tvaron3
Copy link
Member Author

tvaron3 commented Jul 31, 2025

/azp run python - cosmos - tests

Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

@tvaron3
Copy link
Member Author

tvaron3 commented Jul 31, 2025

/azp run python - cosmos - tests

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@tvaron3 tvaron3 marked this pull request as ready for review August 1, 2025 04:53
@Copilot Copilot AI review requested due to automatic review settings August 1, 2025 04:53
@tvaron3 tvaron3 requested a review from a team as a code owner August 1, 2025 04:53
Copy link
Contributor

@Copilot 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 PR addresses staging signoff fixes with a focus on making tests work with actual account locations and fixing a bug where metadata requests were not honoring excluded locations. The changes primarily involve:

  • Updating test configuration to dynamically retrieve and use actual account locations instead of hardcoded values
  • Fixing metadata request handling to properly respect excluded locations for session container, queries, and partition key range operations
  • Various test fixes and improvements including async client initialization and error message formatting

Reviewed Changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test_config.py Added dynamic account location retrieval and populated class attributes
conftest.py Added call to populate account info during test session setup
Multiple test files Updated to use dynamic locations from TestConfig instead of hardcoded values
_session.py Updated session token methods to accept and pass excluded locations options
_routing/routing_map_provider.py Made feed_options parameter required for proper excluded locations handling
_base.py Updated session token header setting to pass options parameter
_global_partition_endpoint_manager_circuit_breaker.py Fixed excluded locations handling in partition key range operations
Multiple execution context files Updated to pass options parameter to routing provider calls
_constants.py Added EXCLUDED_LOCATIONS constant
CHANGELOG.md Documented the excluded locations bug fix
Comments suppressed due to low confidence (1)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@@ -29,7 +29,7 @@ class TestQuery(unittest.TestCase):
connectionPolicy = config.connectionPolicy
TEST_DATABASE_ID = config.TEST_DATABASE_ID
is_emulator = config.is_emulator
credential = config.credential
credential = config.masterKey
Copy link
Member

@simorenoh simorenoh Aug 1, 2025

Choose a reason for hiding this comment

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

was this broken for AAD? same question for the same changes elsewhere

Copy link
Member Author

Choose a reason for hiding this comment

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

I will create a separate live tests pipeline running many of the tests in AAD in separate pr. This will also make it easier to filter them out for staging pipeline. For now, moved everything back to using keys.

Copy link
Member

@simorenoh simorenoh left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! Just one question but it's non-blocking.

tvaron3 added 7 commits August 4, 2025 16:42
…into tvaron3/stagingSignoffFixes

# Conflicts:
#	sdk/cosmos/azure-cosmos/tests/workloads/dev.md
#	sdk/cosmos/azure-cosmos/tests/workloads/workload_configs.py
#	sdk/cosmos/azure-cosmos/tests/workloads/workload_utils.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants