-
Notifications
You must be signed in to change notification settings - Fork 103
Cast federation payload explicilty to an object #757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe change updates the Changes
Sequence Diagram(s)sequenceDiagram
participant Test as MultiSearchTest
participant Client as Meilisearch Client
participant Handles as HandlesMultiSearch
participant HTTP as HTTP Server
Test->>Client: Call multiSearch(queries, federation)
Client->>Handles: multiSearch(queries, federation)
Handles->>Handles: Prepare payload (federation cast to object)
Handles->>HTTP: Send POST request with payload
HTTP-->>Handles: Return response
Handles-->>Client: Return response
Client-->>Test: Return response
Assessment against linked issues
Assessment against linked issues: Out-of-scope changesNo out-of-scope changes detected. Suggested labels
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Ah shit, tests won't work in all CI jobs, because there is always different http client 😑 |
Bump! Would love to get this merged, if I can assist lmk! |
6839aef
to
b442ead
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/Endpoints/Delegates/HandlesMultiSearch.php
(1 hunks)tests/Endpoints/MultiSearchTest.php
(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/Endpoints/Delegates/HandlesMultiSearch.php
🧰 Additional context used
🧬 Code Graph Analysis (1)
tests/Endpoints/MultiSearchTest.php (4)
src/Client.php (1)
Client
(32-68)src/Endpoints/Delegates/HandlesMultiSearch.php (1)
multiSearch
(18-32)src/Contracts/SearchQuery.php (2)
SearchQuery
(7-495)setIndexUid
(365-370)src/Contracts/MultiSearchFederation.php (1)
MultiSearchFederation
(7-94)
🪛 GitHub Check: phpstan-tests
tests/Endpoints/MultiSearchTest.php
[failure] 184-184:
Call to static method PHPUnit\Framework\Assert::assertCount() with 1 and array{} will always evaluate to false.
[failure] 176-176:
Parameter #3 $httpClient of class Meilisearch\Client constructor expects Psr\Http\Client\ClientInterface|null, GuzzleHttp\Client given.
[failure] 176-176:
Instantiated class GuzzleHttp\Client not found.
[failure] 174-174:
Call to static method history() on an unknown class GuzzleHttp\Middleware.
[failure] 171-171:
Instantiated class GuzzleHttp\Handler\MockHandler not found.
[failure] 171-171:
Call to static method create() on an unknown class GuzzleHttp\HandlerStack.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: integration-tests (PHP 8.3)
- GitHub Check: integration-tests (PHP 8.4)
- GitHub Check: integration-tests (PHP 8.0)
- GitHub Check: integration-tests (PHP 8.1)
- GitHub Check: integration-tests (PHP 8.2)
- GitHub Check: integration-tests (PHP 7.4)
🔇 Additional comments (1)
tests/Endpoints/MultiSearchTest.php (1)
7-11
: LGTM! Appropriate imports for HTTP mocking.The imports are correctly added for setting up Guzzle HTTP client mocking to test the federation payload structure.
If i'll have time later today then will complete,otherwise will fix after my holidays |
b442ead
to
1bb9668
Compare
1bb9668
to
90240b3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #757 +/- ##
=======================================
Coverage 89.78% 89.78%
=======================================
Files 59 59
Lines 1449 1449
=======================================
Hits 1301 1301
Misses 148 148 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This is ready. @Strift @brunoocasali can you review |
Pull Request
Related issue
Fixes #685
Replaces #686
What does this PR do?
First commit is cherry-picked to give @thijskuilman original credit
PR checklist
Please check if your PR fulfills the following requirements:
Summary by CodeRabbit
Bug Fixes
Tests