-
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
fix: Expose nodejs templates to django #28078
Conversation
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.
PR Summary
This PR adds proper cleanup functionality to the HogTransformer service to prevent flaky tests in PostHog's plugin server.
- Added
stop()
method toHogTransformerService
to properly cleanup resources viahogFunctionManager.stop()
- Modified
plugin-server/src/cdp/hog-transformations/hog-transformer.service.test.ts
to usebeforeEach
/afterEach
for consistent transformer lifecycle management - Added transformer cleanup to
IngestionConsumer.stop()
sequence with appropriate status logging - Replaced direct
hogTransformer.start()
calls withreloadAllHogFunctions()
where only cache refresh is needed
3 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
}) | ||
|
||
afterEach(async () => { | ||
await closeHub(hub) | ||
await hogTransformer.stop() | ||
|
||
jest.spyOn(hogTransformer['pluginExecutor'], 'execute') |
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.
logic: Spy setup should happen before stop() to avoid potential race conditions
Size Change: 0 B Total Size: 1.16 MB ℹ️ View Unchanged
|
Problem
We want to move to having all templates in the nodejs code. For now we need to support both python and nodejs based options.
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?