question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Option to always record tape for incoming reqeuest

See original GitHub issue

Hello!

I discovered Talkback yesterday and really dig the simplicity of its API and that the tape format is easily human readable. I’m working on adding new testing infrastructure to an existing large system, and see this as a valuable tool to transparently sit between components and record activity between them for later analysis and playback (via another tool, as I don’t think Talkback supports arbitrary tape replay right now)

However, Talkback’s behavior of replaying tapes matching an incoming request subverts this use-case. Consider the following hypothetical request sequence:

  • GET /comment: Get all comments
  • POST /comment: Create a new comment
  • GET /foo: Get all comments again, this time with the newly created one

In this use-case, we expect the second GET call to return a different response from the first, but Talkback will only record the first GET request in this sequence and replay it for the second. This is problematic when situating Talkback as a transparent middle-man between two existing system components.

So, I propose an option that allows the “always replay” behavior to be disabled, and thereby enabling this use-case.

Also, I admit that it’s entirely possible that there exists a better tool for this use-case and that it doesn’t make sense to include this behavior in Talkback. I’m definitely open to alternatives, but my searching around the ecosystem kept leading me back here. If anyone knows of such a better tool, please let me know! 😁

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ijpiantanidacommented, Mar 23, 2019

@thejettdurham @tartale I took some time to reply because I wasn’t sure how to approach this problem. I ended implementing the different modes but through the record option instead of introducing a new one. You can read more here. Feedback welcome 😃

@tartale for your pass-through case, you’d have to set record: RecordMode.DISABLED and fallbackMode: FallbackMode.PROXY.

I just released v1.10.0 which includes this feature. Thanks for using talkback and for the useful idea.

1reaction
thejettdurhamcommented, Mar 13, 2019

Oh I see…I didn’t read your use-cases clearly enough 😅 Yeah, so your signature looks right then 3 possible options.

I have a PR open for my use case right now, I’ll see later on today if it can be adapted to the more general case as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use the Phone app to record calls - Google Support
You can use your Phone app to: Always record calls from unknown numbers. Always record calls from selected contacts. Record an individual call....
Read more >
How To Record a Phone Call (the Easy, Legal Way) - TapeACall
You can always record your call the old fashioned way — by putting your phone on speaker and using another phone or external...
Read more >
How to record a phone call on iPhone and Android
With these three options, it's easy to record your calls so you can always refer back to them later. 1. RingCentral. One of...
Read more >
ijpiantanida/talkback: A simple HTTP proxy that ... - GitHub
Talkback lets you pass a custom matching function as the bodyMatcher option. The function will receive a saved tape and the current request,...
Read more >
Feature Requests - Audacity Wiki
Requests relating to specific use cases - for example we have grouped together requests relating to wildlife recording, language learning and theatre ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found