Skip to content

Cleanup adaptors#134

Merged
Aldo10012 merged 6 commits into
mainfrom
cleanup_adaptors
May 11, 2026
Merged

Cleanup adaptors#134
Aldo10012 merged 6 commits into
mainfrom
cleanup_adaptors

Conversation

@Aldo10012

@Aldo10012 Aldo10012 commented May 11, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Refactor

    • Removed callback-based and publisher-based adapter implementations for Server-Sent Events, including supporting protocol definitions.
    • Removed callback-based and publisher-based adapter implementations for WebSocket services, including supporting protocol definitions.
  • Tests

    • Removed test suites for the removed Server-Sent Events and WebSocket adapters.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 11, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Aldo10012 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 15 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: f08bf1d1-fd54-451d-9240-a0fbf453e72c

📥 Commits

Reviewing files that changed from the base of the PR and between c575a2b and f742c58.

📒 Files selected for processing (12)
  • Sources/EZNetworking/Services/Uploader/DataUploader/DataUploader.swift
  • Sources/EZNetworking/Services/Uploader/DataUploader/Protocols/DataUploadable.swift
  • Sources/EZNetworking/Services/Uploader/FileUploader/FileUploader.swift
  • Sources/EZNetworking/Services/Uploader/FileUploader/Protocols/FileUploadable.swift
  • Tests/EZNetworkingTests/Services/Uploader/DataUploader/DataUploaderTests.swift
  • Tests/EZNetworkingTests/Services/Uploader/DataUploader/DataUploader_asyncAwait_Tests.swift
  • Tests/EZNetworkingTests/Services/Uploader/DataUploader/DataUploader_callbacks_Tests.swift
  • Tests/EZNetworkingTests/Services/Uploader/DataUploader/DataUploader_publisher_Tests.swift
  • Tests/EZNetworkingTests/Services/Uploader/FileUploader/FileUploaderTests.swift
  • Tests/EZNetworkingTests/Services/Uploader/FileUploader/FileUploader_asyncAwait_Tests.swift
  • Tests/EZNetworkingTests/Services/Uploader/FileUploader/FileUploader_callbacks_Tests.swift
  • Tests/EZNetworkingTests/Services/Uploader/FileUploader/FileUploader_publisher_Tests.swift
📝 Walkthrough

Walkthrough

This PR removes the callback and publisher adapter patterns from both ServerSentEvent and WebSocket services. Four adapter protocols and their implementations are deleted, along with all corresponding test suites and test doubles.

Changes

Adapter Pattern Removal

Layer / File(s) Summary
ServerSentEvent Adapter Protocols
Sources/EZNetworking/Services/ServerSentEvent/Adaptors/Protocols/ServerSentEventCallbackClient.swift, Sources/EZNetworking/Services/ServerSentEvent/Adaptors/Protocols/ServerSentEventPublisherClient.swift
ServerSentEventCallbackClient and ServerSentEventPublisherClient protocol definitions are removed, eliminating the callback-based and Combine publisher-based API contracts.
WebSocket Adapter Protocols
Sources/EZNetworking/Services/WebSocket/Adaptors/Protocols/WebSocketCallbackClient.swift, Sources/EZNetworking/Services/WebSocket/Adaptors/Protocols/WebSocketPublisherClient.swift
WebSocketCallbackClient and WebSocketPublisherClient protocol definitions are removed, eliminating the callback-based and Combine publisher-based API contracts.
ServerSentEvent Adapter Implementations
Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventCallbackAdapter.swift, Sources/EZNetworking/Services/ServerSentEvent/Adaptors/ServerSentEventPublisherAdapter.swift
ServerSentEventCallbackAdapter and ServerSentEventPublisherAdapter implementations are removed, including initializers, connection lifecycle methods, event/state subscriptions, and Combine publisher bridges backed by PassthroughSubjects.
WebSocket Adapter Implementations
Sources/EZNetworking/Services/WebSocket/Adaptors/WebSocketCallbackAdapter.swift, Sources/EZNetworking/Services/WebSocket/Adaptors/WebSocketPublisherAdapter.swift
WebSocketCallbackAdapter and WebSocketPublisherAdapter implementations are removed, including initializers, connection methods, send operations, callback registration, and Combine publisher bridges.
Adapter Tests
Tests/EZNetworkingTests/Services/ServerSentEvent/Adaptors/*AdapterTests.swift, Tests/EZNetworkingTests/Services/WebSocket/Adaptors/*AdapterTests.swift
All test suites covering adapter behaviors, plus test doubles (MockServerSentEventClient, MockWebSocket) and error types used for validation, are removed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Adapters vanish like morning mist,
Callback patterns and publishers dismissed.
The tests hop away, no mocks remain,
Simpler paths now clearly plain.
Refactoring done, the code runs lean!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Cleanup adaptors' is vague and generic, using non-descriptive terminology that does not clearly convey the specific nature or scope of the changes being made. Consider a more specific title that describes the primary change, such as 'Remove adapter protocol implementations and callback/publisher adaptor classes' or 'Remove SSE and WebSocket adapter implementations'.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cleanup_adaptors

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented May 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.33333% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../Services/Uploader/DataUploader/DataUploader.swift 93.33% 1 Missing ⚠️
.../Services/Uploader/FileUploader/FileUploader.swift 93.33% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@Aldo10012
Aldo10012 merged commit a21c970 into main May 11, 2026
11 of 12 checks passed
@Aldo10012 Aldo10012 mentioned this pull request May 11, 2026
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.

1 participant