Skip to content

Conversation

@geeksambhu
Copy link
Contributor

What does this PR do?

Fixes #599

Fix middlewares duplicate/multiple initialization in LitServe initialization when multiple `LitAPI` instances were provided
  • Was this discussed/agreed via a Github issue? (no need for typos and docs improvements)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure to update the docs?
  • Did you write any new necessary tests?

As a user, I want to ensure that middleware initialization in LitServe is done only once for any number of LitAPI. This PR fix the bug where default middleware were added multiple times when initializing LitServe

PR review

Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in GitHub issues there's a high chance it will not be merged.

Did you have fun?

Make sure you had fun coding 🙃

@codecov
Copy link

codecov bot commented Sep 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85%. Comparing base (7363cf2) to head (25a3a79).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@         Coverage Diff         @@
##           main   #601   +/-   ##
===================================
  Coverage    85%    85%           
===================================
  Files        39     39           
  Lines      3071   3071           
===================================
  Hits       2609   2609           
  Misses      462    462           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@bhimrazy bhimrazy left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@Borda Borda merged commit 379e5f8 into Lightning-AI:main Sep 2, 2025
22 checks passed
@geeksambhu geeksambhu deleted the fix-duplicate-middleware branch September 2, 2025 15:33
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.

Duplicated Middleware

4 participants