-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(ci): split out temporal, make tests faster #21636
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.
LGTM, assuming tests pass 🤣
posthog/test/test_decorators.py
Outdated
response = self.client.get(f"/api/dummy").json() | ||
|
||
print(response) # noqa: T201 |
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.
:O
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.
this is me trying to debug a CI only failure 😓 - still doesn't work
@@ -144,7 +145,7 @@ runs: | |||
run: echo "PYTEST_ARGS=--snapshot-update" >> $GITHUB_ENV # We can only update snapshots within the PostHog org | |||
|
|||
# Tests | |||
- name: Run FOSS tests | |||
- name: Run FOSS & EE tests |
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.
really we should keep them separate so that someone using the FOSS repo can run the tests
in practice you already can't run the FOSS tests without the EE folder present
so 🙈
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.
oh darn it, I'll create a separate route for the foss repo, good point thanks!
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.
oh wait, that second line.... uhmm uhmm
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.
maybe a future-(Neil|Paul) problem to solve 🙈
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.
😍
only failure now is the test failing on master |
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.
Assuming tests are passing, works for me 👍 Tag me if any of the batch exports are failing and I could take a look.
Problem
Following up from #21613 , this makes tests twice as fast faster, with max time down to ~10 mins from ~20 mins, and extracts out temporal tests into its own thing, because there seems to be some strong dependence there causing tests to time out if not run together (? - didn't investigate this deeply).
It combines foss and ee, because ee were running much more quickly, and doesn't seem like there's any reason to keep them separate now.
But the other advantage of going this route is we don't need to wait for temporal in regular tests, making them faster.
Should be more robust, and the tests do seem to be more evenly distributed. Will consider making the durations update more seamless, to make this easy to update and keep in sync
One thing to be cautious of is whether this makes flopping snapshots more prevalent. If yes, I'd argue that is a problem with tests we should fix (since they depend on order they run in), and try to keep this optimisation in. I've fixed some of these but not sure if new ones will prop up.
Lastly there's this one damn test https://github.com/PostHog/posthog/blob/master/posthog/test/test_decorators.py#L29 which I have no idea why its failing. I will skip this test 🙈 - unless you have any ideas what might be going wrong here?
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?