Skip to content

Conversation

@neha00290
Copy link
Contributor

@neha00290 neha00290 commented Nov 26, 2025

  • Verify full camel case token search: DbException should be found when searching for complete camel case identifiers
  • Verify atomic token search: UserAccountService should be searchable and return matching results for full service class names
  • Verify XML acronym tokenization: XMLHttpRequest should be properly tokenized and discoverable through match_all queries
  • Verify camel case with numbers: OAuth2TokenHandlershould handle mixed alphanumeric camel case tokens correctly
  • Verify multi-word service search:UserManagementService should support complex multi-word camel case service names

@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@neha00290 neha00290 marked this pull request as ready for review November 27, 2025 07:01
@github-actions
Copy link
Contributor

Failed to generate code suggestions for PR

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Nov 27, 2025

Greptile Overview

Greptile Summary

This PR adds comprehensive test coverage for camel case tokenization in the match_all search functionality. The changes include new test data with camel case identifiers (DbException, UserAccountService, XMLHttpRequest, OAuth2TokenHandler, etc.) and 7 new test functions covering full token search, atomic token search, acronym handling, numbers in camel case, edge cases, and backward compatibility.

Key Changes

  • Added 6 camel case test records to match_all.json with various tokenization patterns
  • Configured logging framework in conftest.py with proper basicConfig()
  • Modified data ingestion to load both main test data and camel case test data at session start
  • Added 7 comprehensive test functions for camel case search scenarios
  • Fixed SQL queries in test_advanced_sql.py to use actual column references instead of aliases in GROUP BY/ORDER BY clauses
  • All new tests use three_days_ago time window, matching when test data is ingested

Previous Issues Resolved

  • Duplicate function definitions have been removed
  • Logging framework properly configured (addresses previous style comment)
  • Tests use consistent time windows aligned with data ingestion timing

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • All previous critical issues (duplicate functions, time window mismatches) have been resolved. The changes are test-only with proper data ingestion setup, comprehensive test coverage for the new camel case tokenization feature, and fixes to SQL queries that improve correctness. The logging framework is properly configured and all tests use appropriate time windows.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
tests/api-testing/.gitignore 5/5 Added venv/ to gitignore for virtual environment exclusion
tests/test-data/match_all.json 5/5 Added 6 new test records with camel case tokens for testing tokenization (DbException, UserAccountService, XMLHttpRequest, OAuth2TokenHandler, etc.)
tests/api-testing/tests/conftest.py 5/5 Added logging configuration and ingestion of camel case test data from match_all.json at session start
tests/api-testing/tests/test_search.py 4/5 Added 7 new camel case tokenization tests using three_days_ago time window; previous duplicate function issues resolved
tests/api-testing/tests/test_advanced_sql.py 5/5 Fixed SQL queries to use proper column references and aggregations instead of aliases in GROUP BY and ORDER BY clauses

Sequence Diagram

sequenceDiagram
    participant Test as Test Suite
    participant Conftest as conftest.py
    participant API as OpenObserve API
    participant DB as Data Store
    
    Note over Test,DB: Session Setup (autouse fixture)
    Conftest->>Conftest: Create session
    Conftest->>API: POST logs_data.json to stream_pytest_data
    API->>DB: Ingest main test data
    API-->>Conftest: 200 OK
    Conftest->>Conftest: Log ingestion status
    Conftest->>API: POST match_all.json to stream_pytest_data
    API->>DB: Ingest camel case test data
    API-->>Conftest: 200 OK
    Conftest->>Conftest: Log camel case data status
    
    Note over Test,DB: Test Execution
    Test->>API: POST /_search with match_all('DbException')
    API->>DB: Query with camel case tokenization
    DB-->>API: Return matching hits
    API-->>Test: 200 OK with hits
    
    Test->>API: POST /_search with match_all('UserAccountService')
    API->>DB: Query with camel case tokenization
    DB-->>API: Return matching hits
    API-->>Test: 200 OK with hits
    
    Test->>API: POST /_search with match_all('XMLHttpRequest')
    API->>DB: Query with camel case tokenization
    DB-->>API: Return matching hits
    API-->>Test: 200 OK with hits
    
    Test->>API: POST /_search with match_all('OAuth2TokenHandler')
    API->>DB: Query with camel case tokenization
    DB-->>API: Return matching hits
    API-->>Test: 200 OK with hits
    
    Note over Test,DB: Edge Cases & Compatibility
    Test->>API: POST /_search for edge cases (numbers, special chars)
    API->>DB: Query with various token patterns
    DB-->>API: Return results
    API-->>Test: 200 OK
    
    Test->>API: POST /_search for backward compatibility
    API->>DB: Query with traditional tokens
    DB-->>API: Return results
    API-->>Test: 200 OK
Loading

Copy link
Contributor

@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.

4 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@neha00290
Copy link
Contributor Author

@greptile

Copy link
Contributor

@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.

4 files reviewed, 3 comments

Edit Code Review Agent Settings | Greptile

@neha00290
Copy link
Contributor Author

@greptile

Copy link
Contributor

@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.

5 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@neha00290 neha00290 merged commit 8a15888 into main Nov 27, 2025
48 of 50 checks passed
@neha00290 neha00290 deleted the api-matchall-camelcase-tests branch November 27, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants