Skip to content

fix: route AnalyzeText document errors to errorCol#2569

Open
ranadeepsingh wants to merge 5 commits into
microsoft:masterfrom
ranadeepsingh:fix/analyze-text-error-col
Open

fix: route AnalyzeText document errors to errorCol#2569
ranadeepsingh wants to merge 5 commits into
microsoft:masterfrom
ranadeepsingh:fix/analyze-text-error-col

Conversation

@ranadeepsingh

Copy link
Copy Markdown
Collaborator

Move Azure AI Language document-level errors returned inside HTTP 200 AnalyzeText responses from the response payload into the configured error column after auto-batch flattening. Preserve transport error precedence and add a no-network regression test for mixed document success/error responses.

AB#4638662

Related Issues/PRs

#xxx

What changes are proposed in this pull request?

Briefly describe the changes included in this Pull Request.

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.

Does this PR change any dependencies?

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

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.
  1. Find the corresponding markdown file for your new feature in website/docs/documentation folder.
    Make sure you choose the correct class estimators/transformers and namespace.
  2. Follow the pattern in markdown file and add another section for your new API, including pyspark, scala (and .NET potentially) samples.
  3. Make sure the DocTable points to correct API link.
  4. Navigate to website folder, and run yarn run start to make sure the website renders correctly.
  5. Don't forget to add <!--pytest-codeblocks:cont--> before each python code blocks to enable auto-tests for python samples.
  6. Make sure the WebsiteSamplesTests job pass in the pipeline.

Move Azure AI Language document-level errors returned inside HTTP 200 AnalyzeText responses from the response payload into the configured error column after auto-batch flattening. Preserve transport error precedence and add a no-network regression test for mixed document success/error responses.

AB#4638662

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 23, 2026 23:58
@github-actions

Copy link
Copy Markdown

Hey @ranadeepsingh 👋!
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.

@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the Azure AI Language AnalyzeText transformer to treat document-level errors returned inside HTTP 200 responses as per-document failures by routing them into the configured errorCol after auto-batch flattening, while preserving transport-error precedence. It also adds a regression test that exercises mixed success/error documents without making network calls.

Changes:

  • Add a post-flatten pipeline step to move document-level results.errors entries into errorCol and clear them from the per-document output.
  • Preserve precedence of existing transport errors by coalescing errorCol before routing document-level errors.
  • Add a no-network Scala test that validates mixed success/error document handling.
Show a summary per file
File Description
cognitive/src/main/scala/com/microsoft/azure/synapse/ml/services/language/AnalyzeText.scala Adds a post-flatten Lambda stage to route document-level 200-response errors into errorCol and remove them from the output payload.
cognitive/src/test/scala/com/microsoft/azure/synapse/ml/services/language/AnalyzeTextSuite.scala Adds a regression test using a custom handler to simulate mixed document success/error responses without network access.

Copilot's findings

  • Files reviewed: 2/2 changed files
  • Comments generated: 1

ranadeepsingh and others added 3 commits June 23, 2026 17:04
Use the sbt launcher version from project/build.properties instead of installing the latest apt sbt package. This keeps the JDK 11 PR validation job on the repository's sbt 1.10.11 launcher and avoids sbt 2.x rejecting JDK 11 before scalastyle can run.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Invoke the downloaded sbt launcher explicitly so the GitHub runner does not resolve its preinstalled sbt 2.x binary under JDK 11.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep PR validation commands as plain sbt while placing the repository-version launcher first on PATH for subsequent workflow steps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@codecov-commenter

codecov-commenter commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.78%. Comparing base (b0fa222) to head (5e708a7).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2569      +/-   ##
==========================================
- Coverage   84.80%   84.78%   -0.02%     
==========================================
  Files         334      334              
  Lines       17783    17801      +18     
  Branches     1632     1619      -13     
==========================================
+ Hits        15081    15093      +12     
- Misses       2702     2708       +6     

☔ View full report in Codecov by Harness.
📢 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.

Partition collected rows by error nullability instead of relying on collect order, addressing PR review feedback about Spark DataFrames being unordered.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ranadeepsingh

Copy link
Copy Markdown
Collaborator Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

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