Skip to content
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

Feature Request: Option to Replay Fixed Number of Interactions #892

Open
zby opened this issue Dec 28, 2024 · 0 comments
Open

Feature Request: Option to Replay Fixed Number of Interactions #892

zby opened this issue Dec 28, 2024 · 0 comments

Comments

@zby
Copy link

zby commented Dec 28, 2024

I want to use vcr for debugging and I would like to replay a fixed number of interactions and record the rest.
If I am not mistaken currently all interactions are either recorded or replayed based on the record mode. There's no built-in way to replay only a subset of recorded interactions while recording new ones.

As a workaround I can edit the cassette after each session and remove the new interactions that were saved - but that is a bit time consuming. It would be more convenient if there was a config option for that.

I can see two possibilities:

  1. New Persister Implementation
    Create a subclass of FilesystemPersister that implements this functionality
    Would allow for custom handling of interaction limits without modifying core code
    Could be implemented by users without core changes
  2. New Configuration Option
    Add a global config option (e.g., replay_limit: int)
    Would need to handle interaction with existing record_mode settings
    More user-friendly but requires core changes
@zby zby changed the title Limiting replay to a number of requests Feature Request: Option to Replay Fixed Number of Interactions Dec 28, 2024
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

No branches or pull requests

1 participant