Skip to content

[Search] Make event wrapper constructors package-private - #50834

Merged
Xiaofei Cao (XiaofeiCao) merged 5 commits into
Azure:search/2026-10-01-gafrom
XiaofeiCao:search-event-wrapper-visibility
Oct 19, 2026
Merged

Xiaofei Cao (XiaofeiCao) merged 5 commits into
Azure:search/2026-10-01-gafrom
XiaofeiCao:search-event-wrapper-visibility

Conversation

@XiaofeiCao

@XiaofeiCao Xiaofei Cao (XiaofeiCao) commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Description

  • Make event wrapper constructors package-private since they are only used by SDK internally.

Targets #50648 (search/2026-10-01-ga). No new specification changes; the existing TypeSpec pin is retained.

Also fix the existing SSE iterator Checkstyle violation by routing its exhausted-iterator exception through ClientLogger.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Validation on JDK 17 with AZURE_TEST_MODE=PLAYBACK: passed (exit 0): 142 tests, 0 failures, 0 errors, 0 skipped. Package build, SpotBugs, and JavaDoc: passed. Checkstyle: passed, 0 violations.

mvn --batch-mode --no-transfer-progress -f sdk\search\azure-search-documents\pom.xml clean package spotbugs:check javadoc:javadoc checkstyle:check '-Dspotbugs.skip=false' '-Dtest=ServerSentEventStreamTests,KnowledgeBaseRetrievalStreamTests,SearchGaTests,KnowledgeBaseTests#basicRetrievalStreamSync+basicRetrievalStreamAsync' '-Dgpg.skip=true'

Existing baseline Revapi failures (GA API removals) remain outside this change. Full green CI is not claimed.

Keep decoding in the converter and register typed package-private constructors from the base model. Generate the concrete base and SDK-only payload wrappers through Search customizations, and cover constructor visibility, payload identity, unknown events, malformed data, and cold initialization.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aa365f59-c459-44fc-8076-1d59c78dc0b8
Delete the newly added model test file as requested without changing existing tests or production code.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aa365f59-c459-44fc-8076-1d59c78dc0b8
Route the existing NoSuchElementException through ClientLogger to satisfy Checkstyle without changing iterator exhaustion semantics.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aa365f59-c459-44fc-8076-1d59c78dc0b8
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
35 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aa365f59-c459-44fc-8076-1d59c78dc0b8
@XiaofeiCao
Xiaofei Cao (XiaofeiCao) marked this pull request as ready for review October 16, 2026 05:59
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: aa365f59-c459-44fc-8076-1d59c78dc0b8
@XiaofeiCao Xiaofei Cao (XiaofeiCao) changed the title [Search] Make event base concrete and constructors package-private [Search] Make event wrapper constructors package-private Oct 16, 2026
@github-project-automation github-project-automation Bot moved this from Untriaged to In Progress in Azure SDK for Search Oct 16, 2026
@XiaofeiCao
Xiaofei Cao (XiaofeiCao) merged commit 7942892 into Azure:search/2026-10-01-ga Oct 19, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Azure SDK for Search Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants