Skip to content
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(insights): query endpoint in e2e #24026

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

skoob13
Copy link
Contributor

@skoob13 skoob13 commented Jul 26, 2024

Problem

While e2e tests are running, the query status endpoint doesn't return a completed/failed response being stuck in the pending status. The problem is the execution mode of Celery CELERY_ALWAYS_EAGER, which executes tasks synchronously. The task has already run and the cache stores its result, but we overwrite the result with data generated before the task is executed.

Changes

Check if the task result is an instance of EagerResult and retrieve fresh data from the cache if it is. Potentially, we want to remove CELERY_ALWAYS_EAGER in end-to-end tests and keep async tasks instead. The async execution might be an important part of the e2e flow.

Does this work well for both Cloud and self-hosted?

Yes

How did you test this code?

Manual testing in e2e flows.

@skoob13 skoob13 requested a review from a team July 26, 2024 14:19
@skoob13 skoob13 merged commit dcdaf8e into master Jul 26, 2024
86 checks passed
@skoob13 skoob13 deleted the fix/query-endpoint-in-e2e branch July 26, 2024 16:11
silentninja pushed a commit to silentninja/posthog that referenced this pull request Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants