Skip to content

Conversation

@BrendanWalsh
Copy link
Collaborator

Related Issues/PRs

Fixes failing Azure Maps tests due to authentication errors during async polling.

What changes are proposed in this pull request?

This PR fixes an issue where the subscription-key and api-version were not being correctly passed during the polling phase of asynchronous Azure Maps operations (e.g., batch geocoding).

Changes:

  • Modified MapsAsyncReply in AzureMapsTraits.scala.
  • Updated extractHeaderValuesForPolling to extract authentication parameters (subscription-key, api-version) from the original request's query string.
  • Updated queryForResult to append these parameters to the polling URL, ensuring the polling requests are properly authenticated.

How is this patch tested?

  • I have written tests (not required for typo or doc fix) and confirmed the proposed feature/bug-fix/change works.

Verified by running the following test suites locally:

  • com.microsoft.azure.synapse.ml.services.geospatial.AzMapsSearchAddressSuite
  • com.microsoft.azure.synapse.ml.services.geospatial.AzMapsSearchReverseAddressSuite
  • com.microsoft.azure.synapse.ml.services.geospatial.AzMapsPointInPolygonSuite

All tests passed successfully.

Does this PR change any dependencies?

  • No. You can skip this section.

Does this PR add a new feature? If so, have you added samples on website?

  • No. You can skip this section.

@BrendanWalsh
Copy link
Collaborator Author

/azp run

@github-actions
Copy link

Hey @BrendanWalsh 👋!
Thank you so much for contributing to our repository 🙌.
Someone from SynapseML Team will be reviewing this pull request soon.

We use semantic commit messages to streamline the release process.
Before your pull request can be merged, you should make sure your first commit and PR title start with a semantic prefix.
This helps us to create release messages and credit you for your hard work!

Examples of commit messages with semantic prefixes:

  • fix: Fix LightGBM crashes with empty partitions
  • feat: Make HTTP on Spark back-offs configurable
  • docs: Update Spark Serving usage
  • build: Add codecov support
  • perf: improve LightGBM memory usage
  • refactor: make python code generation rely on classes
  • style: Remove nulls from CNTKModel
  • test: Add test coverage for CNTKModel

To test your commit locally, please follow our guild on building from source.
Check out the developer guide for additional guidance on testing your change.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 84.36%. Comparing base (38b53c6) to head (2c758b0).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...napse/ml/services/geospatial/AzureMapsTraits.scala 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2450      +/-   ##
==========================================
- Coverage   84.38%   84.36%   -0.03%     
==========================================
  Files         335      335              
  Lines       17690    17711      +21     
  Branches     1619     1610       -9     
==========================================
+ Hits        14928    14941      +13     
- Misses       2762     2770       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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 PR fixes authentication errors in Azure Maps asynchronous polling operations by ensuring that subscription-key and api-version query parameters are properly propagated from the initial request to subsequent polling requests.

Key Changes:

  • Overrides extractHeaderValuesForPolling to extract authentication parameters from query strings instead of HTTP headers
  • Modifies queryForResult to append extracted parameters to polling URLs
  • Updates handlingFunc to pass extracted parameters through the polling flow

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

@BrendanWalsh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BrendanWalsh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BrendanWalsh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BrendanWalsh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BrendanWalsh
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@BrendanWalsh BrendanWalsh merged commit b8d7b8a into master Dec 1, 2025
66 of 70 checks passed
@BrendanWalsh BrendanWalsh deleted the brwals/geo branch December 1, 2025 22:46
BrendanWalsh added a commit to BrendanWalsh/SynapseML that referenced this pull request Dec 5, 2025
* fix: Fix geospatial test error caused by invalid auth

* Update cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/geospatial/AzureMapsTraits.scala

Co-authored-by: Copilot <[email protected]>

* fix: Use getRawQuery to prevent double-decoding of Azure Maps auth params

* fix: Resolve scalastyle violations in AzureMapsTraitsSuite

* fix jarloadingutils for inner classes

* fix: Resolve FuzzingTest failures by fixing JarLoadingUtils and refactoring TestableMapsAsyncReply

* Add fuzzing exemptions for private api

---------

Co-authored-by: Copilot <[email protected]>
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