Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Oct 12, 2025

This pull request updates the Switcher Client SDK to version 2.5.1 and fixes throttle feature when using Strategy inputs. The issue was that the mapper wasn't assigning the entries (Strategy inputs) to the copied response object, which caused the cache to have invalid entries.

Refactoring and code maintenance:

  • Moved query parameter constants (KEY, SHOW_REASON, BYPASS_METRIC) from SwitcherRequest to the ClientWS interface, and updated all references to use the new location. [1] [2] [3]
  • Updated method and variable names for clarity, such as renaming parameters from switcher to switcherRequest in service classes and test files. [1] [2] [3]

Functional improvements:

  • Enhanced the Mapper.mapFrom method to correctly set the entry field in SwitcherResult by passing the SwitcherRequest object, ensuring accurate mapping between requests and responses.
  • Fixed cache lookup logic in SwitcherRequest by referencing the correct entry field instead of using a getter, improving cache hit accuracy.

@petruki petruki added this to the v2.5.1 milestone Oct 12, 2025
@petruki petruki self-assigned this Oct 12, 2025
@petruki petruki added the patch Updating internal dependencies label Oct 12, 2025
@sonarqubecloud
Copy link

@petruki petruki merged commit 75d4b11 into master-2 Oct 12, 2025
9 checks passed
@petruki petruki deleted the bugfix_371 branch October 12, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

patch Updating internal dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants