10000 Run tests only with a single http client by norkunas · Pull Request #758 · meilisearch/meilisearch-php · GitHub
[go: up one dir, main page]

Skip to content

Run tests only with a single http client #758

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

Merged
merged 1 commit into from
Jul 4, 2025

Conversation

norkunas
Copy link
Collaborator
@norkunas norkunas commented May 29, 2025

Pull Request

Related issue

Fixes #<issue_number>

What does this PR do?

  • Removes testing with multiple http clients as it's not sdk responsibility to test if they behaves correctly. PSR18 clients are interoperable, so they must work same by contract.

Why?

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Summary by CodeRabbit

  • Chores
    • Simplified test workflows by removing testing across multiple HTTP client implementations.
    • Removed jobs related to PHP 7.4 with Guzzle 6 from test workflows.
    • Updated development dependencies to replace Guzzle with Symfony HTTP client and added it as a suggested package.

Copy link
coderabbitai bot commented May 29, 2025
## Walkthrough

The GitHub Actions workflows were simplified by removing the HTTP client matrix and all related conditional steps for switching HTTP client dependencies. Dedicated jobs for testing with Guzzle 6 on PHP 7.4 were deleted. In `composer.json`, the Symfony HTTP client was added as a development dependency and suggestion, while Guzzle was removed from development requirements.

## Changes

| File(s)                                                                                 | Change Summary                                                                                   |
|-----------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------|
| `.github/workflows/meilisearch-beta-tests.yml`,<br>`.github/workflows/pre-release-tests.yml`,<br>`.github/workflows/tests.yml` | Removed HTTP client matrix and conditional dependency switching; deleted `test_php_7_guzzle_6` job. |
| `composer.json`                                                                         | Added Symfony HTTP client as a dev dependency and suggestion; removed Guzzle from dev dependencies. |

## Suggested labels

`enhancement`

## Poem

> A hop through the workflows, light and neat,  
> Matrixes trimmed, no more client swap feat.  
> Symfony hops in, Guzzle takes a bow,  
> Simpler tests run—much lighter now!  
> With every commit, the garden grows bright,  
> 🐇 Cheers to clean code and a future so light!

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7493ee5 and 0078a8c.

📒 Files selected for processing (4)
  • .github/workflows/meilisearch-beta-tests.yml (1 hunks)
  • .github/workflows/pre-release-tests.yml (1 hunks)
  • .github/workflows/tests.yml (2 hunks)
  • composer.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • .github/workflows/meilisearch-beta-tests.yml
  • .github/workflows/pre-release-tests.yml
  • composer.json
  • .github/workflows/tests.yml

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@norkunas norkunas force-pushed the test-single-client branch 2 times, most recently from 5181d8a to ff155a4 Compare May 29, 2025 11:41
Copy link
codecov bot commented May 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.78%. Comparing base (368c73f) to head (0078a8c).
Report is 77 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #758      +/-   ##
==========================================
- Coverage   90.74%   89.78%   -0.97%     
==========================================
  Files          52       59       +7     
  Lines        1340     1449     +109     
==========================================
+ Hits         1216     1301      +85     
- Misses        124      148      +24     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/pre-release-tests.yml (1)

42-50: Clean up commented-out HTTP client matrix lines
Since support for multiple HTTP clients has been removed, you can streamline this workflow by deleting the now-unused commented blocks under matrix.http-client and exclude. This will make the YAML more maintainable.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a5bef7 and ff155a4.

📒 Files selected for processing (4)
  • .github/workflows/meilisearch-beta-tests.yml (1 hunks)
  • .github/workflows/pre-release-tests.yml (1 hunks)
  • .github/workflows/tests.yml (1 hunks)
  • composer.json (1 hunks)
🔇 Additional comments (2)
composer.json (2)

38-42: Ensure suggested HTTP clients align with current strategy
We’ve commented out multi-client testing and standardized on Symfony HTTP client in CI/development. Please verify that the suggest section still accurately reflects the clients you intend to support (e.g., if Guzzle remains supported, document that as optional). Also consider updating the README to highlight Symfony HTTP client as the primary recommendation.


49-52: Standardize development dependencies on Symfony HTTP client
Removal of guzzlehttp/guzzle from require-dev and addition of symfony/http-client correctly aligns your dev dependencies with the CI changes. This ensures tests and discovery will pick up the Symfony client by default.

@norkunas norkunas added enhancement New feature or request CI maintenance Anything related to maintenance (CI, tests, refactoring...) labels May 29, 2025
@norkunas norkunas force-pushed the test-single-client branch from ff155a4 to 7493ee5 Compare May 29, 2025 11:50
Copy link
Collaborator
@Strift Strift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support this change, but would prefer to have feedback from @brunoocasali too before moving forward.

brunoocasali
brunoocasali previously approved these changes Jul 1, 2025
Copy link
Member
@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I understand if we state that we are PSR compliant it means no matter which HTTP library the customer uses, it should work. And that's the beauty of it. I never understood why we had such complex CI in the first place LGTM!

@norkunas norkunas force-pushed the test-single-client branch from 7493ee5 to 23f43c5 Compare July 2, 2025 04:46
@brunoocasali brunoocasali merged commit 5e89737 into meilisearch:main Jul 4, 2025
18 of 23 checks passed
@norkunas norkunas deleted the test-single-client branch July 4, 2025 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI enhancement New feature or request maintenance Anything related to maintenance (CI, tests, refactoring...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0