Skip to content

Conversation

@BrendanWalsh
Copy link
Collaborator

Related Issues/PRs

Fixes broken build and tests caused by the retirement of Bing Search API v7.

What changes are proposed in this pull request?

Briefly describe the changes included in this Pull Request.

This PR removes all dependencies on the deprecated BingImageSearch and BingSearchAPIWrapper components, which are no longer functional following the retirement of the Bing Search API v7.

Key Changes:

  • Removed Components: Deleted BingImageSearch (Scala & Python), ImageSearchSuite, and BingSearchAPIWrapper references.
  • Refactored Notebooks:
    • Quickstart - Snow Leopard Detection.ipynb: Replaced dynamic Bing Search with a static dataset of snow leopard images. Implemented a custom download_bytes UDF to replace the BingImageSearch downloader.
    • Quickstart - Analyze Celebrity Quotes.ipynb: Replaced Bing Search query with a static list of celebrity image URLs.
  • Refactored Tests:
    • Updated FormRecognizerSuite, ComputerVisionSuite, OCRSuite, and others to remove BingImageSearch dependency.
    • Introduced a shared VisionUtils trait with a downloadBytes UDF to handle image downloading for tests, ensuring they remain deterministic and fast.

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.

Verification Steps:

  1. Compilation: Verified that all refactored test suites (FormRecognizerSuite, ComputerVisionSuite, etc.) compile successfully.
  2. Test Execution: Ran sbt "testOnly *FormRecognizerSuite *ComputerVisionSuite" to confirm the new static data approach works as expected.
  3. Notebook Verification: Manually verified that the refactored notebooks are syntactically correct and free of legacy bing-search-key references.
  4. Cleanliness: Confirmed via grep that no references to BingImageSearch or bing-search-key remain in the active codebase.

Does this PR change any dependencies?

  • No. You can skip this section.
  • Yes. Make sure the dependencies are resolved correctly, and list changes here.

Removed internal dependencies on BingImageSearch and external calls to Bing Search API.

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

  • No. You can skip this section.
  • Yes. Make sure you have added samples following below steps.

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 removes the deprecated BingImageSearch and related components following the retirement of Bing Search API v7. The removal includes Scala and Python implementations, test files, and associated schemas. Tests that previously relied on BingImageSearch for downloading images have been refactored to use a new downloadBytes utility function with static datasets.

Key Changes:

  • Removed deprecated Bing Search components (BingImageSearch, ImageSearchSchemas, ImageSearchSuite)
  • Introduced VisionUtils and enhanced FormRecognizerUtils traits with downloadBytes functionality to replace BingImageSearch download capabilities
  • Refactored test suites to use direct HTTP downloads instead of the deprecated BingImageSearch API

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
core/src/test/scala/com/microsoft/azure/synapse/ml/Secrets.scala Removed BingSearchKey secret reference
core/src/main/scala/com/microsoft/azure/synapse/ml/logging/FeatureNames.scala Removed BingImage feature name from AI Services
cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/vision/ComputerVisionSuite.scala Added VisionUtils trait with downloadBytes functionality; refactored all vision test suites to use new download approach
cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/form/FormRecognizerSuite.scala Added downloadBytes utility to FormRecognizerUtils; simplified createTestDataframe with default parameter
cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/bing/ImageSearchSuite.scala Deleted entire test suite for deprecated BingImageSearch
cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/bing/ImageSearchSchemas.scala Deleted schema definitions for BingImageSearch API
cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/bing/BingImageSearch.scala Deleted main BingImageSearch implementation
cognitive/src/main/python/synapse/ml/services/bing/BingImageSearch.py Deleted Python wrapper for BingImageSearch

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

}



Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Excessive whitespace: Multiple blank lines (2) before override implicit lazy val dfEq. Consider reducing to a single blank line to maintain consistency.

Suggested change

Copilot uses AI. Check for mistakes.
}



Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Excessive whitespace: Multiple blank lines (2) before override def assertDFEq(). Consider reducing to a single blank line to maintain consistency.

Suggested change

Copilot uses AI. Check for mistakes.
}



Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Excessive whitespace: Multiple blank lines (2) before override def assertDFEq(). Consider reducing to a single blank line to maintain consistency.

Suggested change

Copilot uses AI. Check for mistakes.
}



Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Excessive whitespace: Multiple blank lines (2) before override def testObjects(). Consider reducing to a single blank line to maintain consistency.

Suggested change

Copilot uses AI. Check for mistakes.
BrendanWalsh and others added 5 commits November 24, 2025 22:33
…es/form/FormRecognizerSuite.scala

Co-authored-by: Copilot <[email protected]>
…es/form/FormRecognizerSuite.scala

Co-authored-by: Copilot <[email protected]>
…es/form/FormRecognizerSuite.scala

Co-authored-by: Copilot <[email protected]>
…es/vision/ComputerVisionSuite.scala

Co-authored-by: Copilot <[email protected]>
…es/vision/ComputerVisionSuite.scala

Co-authored-by: Copilot <[email protected]>
@BrendanWalsh BrendanWalsh changed the title [chore] Remove deprecated Bing Search APIs and refactor dependent tests chore: Remove deprecated Bing Search APIs and refactor dependent tests Nov 25, 2025
@ranadeepsingh
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.51%. Comparing base (38b53c6) to head (c3cdccb).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2451      +/-   ##
==========================================
- Coverage   84.38%   82.51%   -1.88%     
==========================================
  Files         335      334       -1     
  Lines       17690    17598      -92     
  Branches     1619     1579      -40     
==========================================
- Hits        14928    14521     -407     
- Misses       2762     3077     +315     

☔ 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.

levscaut and others added 4 commits December 1, 2025 21:51
When using file input in OpenAIPrompt before, a text message will be sent along: The name of the file to analyze is %s.\nHere is the content:\n, this will cause info leak in file name, as long as extra token used. So it's for the best to remove this piece of message.

authored-by: Wendong Li <[email protected]>
* fix: Make translation test less flaky

* Make another check more flexible

* increased flexibility

* fix scalastyle
@microsoft microsoft deleted a comment from github-actions bot Dec 2, 2025
@microsoft microsoft deleted a comment from Copilot AI Dec 2, 2025
@microsoft microsoft deleted a comment from Copilot AI Dec 2, 2025
@microsoft microsoft deleted a comment from Copilot AI Dec 2, 2025
@microsoft microsoft deleted a comment from Copilot AI Dec 2, 2025
@microsoft microsoft deleted a comment from Copilot AI Dec 2, 2025
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.

5 participants