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

test(ci): make test suites v3 ready #1063

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

test(ci): make test suites v3 ready #1063

wants to merge 7 commits into from

Conversation

hassiebp
Copy link
Contributor

@hassiebp hassiebp commented Jan 7, 2025

Important

Update CI configuration and test utilities for version 3 compatibility, including new environment variables and improved HTTP request handling.

  • CI Configuration:
    • Update .github/workflows/ci.yml to include LANGFUSE_INGESTION_QUEUE_DELAY_MS and LANGFUSE_INGESTION_CLICKHOUSE_WRITE_INTERVAL_MS environment variables.
  • Test Data Structures:
    • Change mock_metadata and mock_deep_metadata in tests/test_decorators.py from strings to dictionaries.
  • HTTP Client:
    • Add HTTPClientWithRetries class in tests/utils.py to handle HTTP requests with retries using backoff and httpx.

This description was created by Ellipsis for 6edb911. It will automatically update as commits are pushed.

@hassiebp hassiebp marked this pull request as draft January 7, 2025 16:16
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Disclaimer: Experimental PR review

PR Summary

This PR updates the test suite for v3 compatibility by implementing retry logic for HTTP requests, transitioning to queue-based ingestion, and modifying test metadata structures.

  • Added new HTTPClientWithRetries class in tests/utils.py with exponential backoff (4 retries within 3s) for non-500 errors
  • Updated CI environment variables in .github/workflows/ci.yml to support queue-based ingestion with configurable delays
  • Changed mock metadata in tests/test_decorators.py from strings to dictionaries for more realistic testing scenarios
  • Removed direct database access environment variables from CI workflow in favor of queue-based processing

3 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile

tests/utils.py Outdated Show resolved Hide resolved
tests/utils.py Outdated Show resolved Hide resolved
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.

1 participant