Skip to content

fix: delete Content Understanding results after conversion - #2352

Open
Elioooon (Elioooon) wants to merge 1 commit into
microsoft:mainfrom
Elioooon:fix/delete-cu-results
Open

fix: delete Content Understanding results after conversion#2352
Elioooon (Elioooon) wants to merge 1 commit into
microsoft:mainfrom
Elioooon:fix/delete-cu-results

Conversation

@Elioooon

Copy link
Copy Markdown

Summary

  • delete each Azure Content Understanding result after conversion using the SDK's public poller.operation_id
  • run cleanup even when analysis or result formatting raises
  • keep successful conversion output when cleanup is unauthorized or unavailable, with a warning

Fixes #2327.

Validation

  • python -m pytest tests/test_cu_converter.py -q (127 passed)
  • python -m black --check src/markitdown/converters/_cu_converter.py tests/test_cu_converter.py (2 files unchanged)
  • verified with azure-ai-contentunderstanding==1.2.0b3 that AnalyzeLROPoller.operation_id and ContentUnderstandingClient.delete_result(...) are public APIs

Boundaries

All Azure service calls were mocked; no live Content Understanding resource was used. If the caller lacks delete permission, conversion still succeeds and Azure retains the result until automatic expiry.

@Elioooon

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

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.

Security: delete the Content Understanding result after reading it (needed for multi-session hosted agents)

1 participant