-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
feat: Destination tests for batch exports #28687
base: master
Are you sure you want to change the base?
Conversation
43f589a
to
2dab705
Compare
posthog/batch_exports/http.py
Outdated
@action(methods=["POST"], detail=True) | ||
def test(self, request: request.Request, *args, **kwargs) -> response.Response: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this endpoint just for fetching a test (and it's list of steps) for a given batch export?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, thought about having everything in a single endpoint, but it looked too complicated. I'd be happy to rename this to something more verbose though...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it does make sense to get a list of possible tests upfront, especially if we want to add them to destinations one at a time, since the frontend could probably not even show a test button if there are no tests to run for example. Was also wondering if it could just be a GET method if it's not actually running anything
Problem
The most common type error when interacting with batch exports are user configuration errors. This PR introduces a new framework for "Destination tests": Tests that can be called from our API to evaluate a given batch export configuration.
Changes
👉 Stay up-to-date with PostHog coding conventions for a smoother review.
Does this work well for both Cloud and self-hosted?
How did you test this code?
New unit tests.