Add VCR auto-recording in platform debug mode#91
Merged
matyas-jirat-keboola merged 7 commits intomainfrom Feb 26, 2026
Merged
Conversation
execute_action() now detects KBC_COMPONENT_RUN_MODE=debug and automatically records HTTP interactions via keboola.vcr. Components can define a module-level VCR_SANITIZERS list for custom sanitizers. Add keboola.vcr as a dependency. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pytz was only used for utc.localize() in one place. Since the project requires Python >= 3.10, datetime.timezone.utc is a direct stdlib replacement. Also removes the overly restrictive <2021.0 version pin. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
KBC_COMPONENT_RUN_MODE=debug)VCRRecorder.record_debug_run()from thekeboola.vcrpackage, capturing HTTP interactions for later replay in testsVCR_SANITIZERSdefined at the component module level for redacting sensitive datakeboola.vcras a dependency inpyproject.tomlHow it works
When
KBC_COMPONENT_RUN_MODE=debugis set (e.g. via the platform's debug run mode),execute_action()automatically wraps the action dispatch with VCR recording instead of running it directly. The recorded cassette can then be used as fixtures for functional/VCR tests.Test plan
KBC_COMPONENT_RUN_MODEor any value other thandebug) without any change in behaviourKBC_COMPONENT_RUN_MODE=debugtriggers VCR recording and produces a cassetteVCR_SANITIZERSdefined in a component module are picked up and applied during recording🤖 Generated with Claude Code