Skip to content

Conversation

@petruki
Copy link
Member

@petruki petruki commented Oct 17, 2025

This pull request introduces a refactor to the Switcher executions history mechanism, replacing the previous "historyExecution" approach with a more explicit and maintainable "executionsMap". The changes clarify the API for managing executions, add new methods for controlling execution memory, and update documentation and tests to reflect the new behavior. This change should also considerably improve performance for local and remote if there is no need to keep the executions results.

Executions History Refactor

  • Replaced the historyExecution map with executionsMap in SwitcherRequest, and updated all related logic and method names to use the new terminology. This improves clarity and maintainability in how executions are stored and retrieved. [1] [2] [3] [4] [5]
  • Added flushExecutions() to the Switcher interface and implemented it in SwitcherRequest, allowing users to explicitly clear stored executions. [1] [2]
  • Introduced keepExecutions flag and keepExecutions() method in SwitcherBuilder to enable/disable executions memory per switcher instance. [1] [2]

API and Method Updates

  • Deprecated and replaced flush() with resetInputs() for clearing input entries without affecting executions, and updated usages throughout the codebase and tests. [1] [2] [3]
  • Updated method names and documentation to use "executions" instead of "history", improving consistency and readability. [1] [2] [3]

These changes collectively make executions management in the Switcher API more explicit, flexible, and easier to use and maintain.

@petruki petruki added this to the v1.9.2 milestone Oct 17, 2025
@petruki petruki self-assigned this Oct 17, 2025
@petruki petruki added the dependencies Pull requests that update a dependency file label Oct 17, 2025
@sonarqubecloud
Copy link

@petruki petruki merged commit 74cc72c into master Oct 17, 2025
13 checks passed
@petruki petruki deleted the staging branch October 17, 2025 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants