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

chore(product-assistant): speed up evaluation tests v2 #27062

Merged
merged 8 commits into from
Dec 19, 2024

Conversation

skoob13
Copy link
Contributor

@skoob13 skoob13 commented Dec 19, 2024

Problem

Attempt 2. I've verified that all tests run now.

Evaluation tests are slow, so their goal is not fulfilled. Let's make them faster. It still feels slow when running all tests, but this is now ready to run in CI.

Changes

  • Matrix sets up only once before all test runs.
  • Kafka tables are created on demand.
  • Kafka tables are dropped without the ON CLUSTER clause, which saves at least one minute of tear down.
  • Move retries from flaky to a custom decorator so it doesn't set up a new matrix.
  • Remove Django test cases. It allows us to use parallel parametrization in the future.

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

No

How did you test this code?

Manual testing

@skoob13 skoob13 changed the title refactor: funnel tests chore(product-assistant): speed up evaluation tests v2 Dec 19, 2024
@skoob13 skoob13 requested a review from Twixes December 19, 2024 16:19
@skoob13 skoob13 marked this pull request as ready for review December 19, 2024 16:19
)
# Apply our custom retry decorator to the test function
item.obj = retry_test_only(max_retries=3)(item.obj)
if Path(item.fspath).is_relative_to(current_dir):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, yeah, I even checked pytest docs to make sure this only applies to this directory:
Screenshot 2024-12-19 at 18 23 49
and that put me at ease so much I didn't bother checking if non-eval tests will still run 🙈

@Twixes Twixes merged commit e3653cc into master Dec 19, 2024
100 checks passed
@Twixes Twixes deleted the fix/speed-up-eval-tests branch December 19, 2024 17:24
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