-
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
ci: Add dags folder to tests #28753
ci: Add dags folder to tests #28753
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 integrates the 'dags' folder into the CI test suite, focusing on ensuring test isolation and proper database cleanup for ClickHouse operations.
- Added
reset_clickhouse_database()
function inposthog/test/base.py
to handle database cleanup, improving code reuse and test isolation - Modified
conftest.py
to wrap cluster fixture with cleanup calls before and after each test - Updated
.github/actions/run-backend-tests/action.yml
to include 'dags' in test paths when person-on-events is false - Removed manual table truncation from
test_deletes.py
, relying on framework-level cleanup - Improved test structure in
test_materialized_columns.py
by standardizing query execution methods
5 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
pytest ${{ | ||
inputs.person-on-events == 'true' | ||
&& './posthog/clickhouse/ ./posthog/queries/ ./posthog/api/test/test_insight* ./posthog/api/test/dashboards/test_dashboard.py' | ||
|| 'posthog' | ||
|| 'posthog dags' | ||
}} ${{ inputs.person-on-events == 'true' && 'ee/clickhouse/' || 'ee/' }} -m "not async_migrations" \ |
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.
style: The test path 'posthog dags' should be quoted as a single string to avoid shell interpretation issues, e.g. 'posthog dags'. Consider using './posthog ./dags' for more explicit path handling.
Problem
These tests aren't being run as part of CI
Changes
Run these tests as part of CI and ensure the tests use a clean database to avoid state leaks between test runs, as we're often running jobs that do DDL or DML operations on full tables
Does this work well for both Cloud and self-hosted?
N/A
How did you test this code?
They are tests