Skip to content

fix: invoke_oci_api fails for LogSearchClient.search_logs bug#362

Open
dustin-sale wants to merge 1 commit into
oracle:mainfrom
dustin-sale:356-search-logs-bug
Open

fix: invoke_oci_api fails for LogSearchClient.search_logs bug#362
dustin-sale wants to merge 1 commit into
oracle:mainfrom
dustin-sale:356-search-logs-bug

Conversation

@dustin-sale

Copy link
Copy Markdown
Contributor

Description

Fix invoke_oci_api pagination for OCI responses that expose records through results, including oci.loggingsearch.LogSearchClient.search_logs.

The generic OCI SDK paginator assumes non-list response models expose items, which caused SearchResponse.results calls to fail. This change uses the server’s response-shape-aware pagination loop for bounded and unbounded requests, preserves DNS/Object Storage handling, and retains unbounded SDK limit pass-through semantics.

Dependencies: none.

Fixes #356

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • make lint
  • make test project=oci-cloud-mcp-server — 199 passed; 91.75% coverage
  • Live read-only LogSearchClient.search_logs calls against the supplied Phoenix log group, covering empty SearchResponse.results for bounded and unbounded paths

Test Configuration:

  • Firmware version: N/A
  • Hardware: macOS development machine
  • Toolchain: Python 3.13.13, UV
  • SDK: OCI Python SDK 2.179.0

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@oracle-contributor-agreement oracle-contributor-agreement Bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jul 10, 2026
@dustin-sale dustin-sale changed the title bugfix for log search client fix: invoke_oci_api fails for LogSearchClient.search_logs bug Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

invoke_oci_api fails for LogSearchClient.search_logs: SearchResponse uses results, not items

1 participant