feat: Allow for providers with equal name in the multiprovider#1848
feat: Allow for providers with equal name in the multiprovider#1848chrfwow wants to merge 1 commit intoopen-feature:mainfrom
Conversation
Signed-off-by: christian.lutnik <christian.lutnik@dynatrace.com>
Summary of ChangesHello @chrfwow, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
There was a problem hiding this comment.
Code Review
This pull request successfully refactors the MultiProvider to allow providers with identical names by switching from a Map to a List for storing providers. This is a well-documented breaking change for the experimental Strategy interface. The modifications are consistently applied throughout the affected classes and their corresponding tests. The test suite has been updated effectively to accommodate these changes. I've identified one minor area for improvement in a test case to enhance its robustness. Overall, the change is well-implemented.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1848 +/- ##
============================================
+ Coverage 92.51% 93.51% +1.00%
Complexity 642 642
============================================
Files 58 58
Lines 1536 1527 -9
Branches 170 168 -2
============================================
+ Hits 1421 1428 +7
+ Misses 70 56 -14
+ Partials 45 43 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|



This PR
Adds support for different providers with the same name in the multi provider. Since the interface
Strategyhas changed, this would be a breaking change if the multiprovider was not experimental.The downside is, that the providers are not passed to the
Strategyin a map, which makes the retrieval of a provider per name more difficult, and, depending on the number of providers, slower. However, since there will only ever be a handfull of providers, this should make no difference in real scenarios. Furthermore, the current map based version may result in unexpected behavior when two or more providers have the same name.Related Issues
Fixes #1792