Commit Graph

10 Commits

Author SHA1 Message Date
Oliver Falk
80df736433 Fix deployment verification to wait for correct version
- Modified check_deployment.py to wait for the correct commit hash
- Now retries until the expected version is deployed (not just site responding)
- Prevents performance tests from running against old versions
- Maintains existing retry logic with proper version checking
- Only runs functionality tests after version verification passes
2025-10-24 11:00:05 +02:00
Oliver Falk
7350afd988 Adjust performance thresholds for dev environment
- Add --avatar-threshold parameter to performance tests
- Set dev environment threshold to 2500ms (vs 1000ms for prod)
- Dev environments are expected to be slower due to resource constraints
- Production keeps strict 1000ms threshold for optimal performance
2025-10-24 10:41:54 +02:00
Oliver Falk
5556f7bd9a Fix local performance tests: Handle Django redirects properly
- Add follow=True to Django test client requests to handle redirects
- Fix content length handling for FileResponse objects
- Local performance tests now pass correctly showing  status

This resolves the issue where all avatar generation tests were showing
'Failed' status even though they were working correctly.
2025-10-23 19:07:23 +02:00
Oliver Falk
81582bcf45 Fix CI pipeline: Add missing dependencies for performance tests
- Add Pillow, prettytable, and pyLibravatar to performance test jobs
- Make performance_tests.py work without Django dependencies
- Add local implementations of generate_random_email and random_string
- Fix ModuleNotFoundError: No module named 'PIL' in CI environment
- Fix flake8 redefinition warning

This resolves the pipeline failure in performance_tests_dev job.
2025-10-23 18:11:55 +02:00
Oliver Falk
ac58c9f626 Add comprehensive type hints to performance tests
🔧 Type Safety Improvements:
- Added typing imports (Dict, List, Any, Optional, Tuple)
- Added type hints to all 25+ methods and functions
- Added type annotations to class attributes and instance variables
- Added proper return type annotations

📝 Enhanced Code Quality:
- Class attributes: AVATAR_STYLES: List[str], AVATAR_SIZES: List[int]
- Method parameters: All parameters now have explicit types
- Return types: All methods have proper return type annotations
- Complex types: Tuple[float, float], List[Dict[str, Any]], etc.

��️ Safety Improvements:
- Added runtime checks for None values
- Proper error handling for uninitialized clients
- Better type safety for optional parameters
- Enhanced IDE support and error detection

 Benefits:
- Better autocomplete and refactoring support
- Types serve as inline documentation
- Catch type-related errors before runtime
- Easier maintenance and collaboration
- Follows modern Python best practices

All functionality preserved and tested successfully.
2025-10-23 15:59:59 +02:00
Oliver Falk
202ae44346 Enhance performance tests with comprehensive improvements
Major enhancements to scripts/performance_tests.py:

🚀 Features Added:
- Complete avatar style coverage (identicon, monsterid, robohash, pagan, retro, wavatar, mm, mmng)
- All sizes tested (80px, 256px) for each style
- Cache hit/miss tracking and display
- Random email generation for realistic testing
- Full libravatar URL generation using official library
- Professional table output with PrettyTable

📊 Display Improvements:
- Perfect alignment with PrettyTable library
- Visual dividers between avatar styles
- Status icons ( success, ⚠️ mixed,  failed)
- Cache status indicators (hit/miss/mixed/error)
- Email address and example URL display
- Grouped results by avatar style with averages

🔧 Technical Improvements:
- Integrated libravatar library for URL generation
- Replaced manual URL construction with proper library calls
- Enhanced error handling and reporting
- Added prettytable dependency to requirements.txt
- Improved code organization and maintainability

🎯 Testing Coverage:
- 8 avatar styles × 2 sizes = 16 test combinations
- Cache performance testing with hit/miss analysis
- Concurrent load testing with cache statistics
- Both local and remote testing modes supported

The performance tests now provide comprehensive, professional output
that's easy to read and analyze, with complete coverage of all
avatar generation functionality.
2025-10-23 15:26:38 +02:00
Oliver Falk
b4f224cd4d Enhance the performance tests 2025-10-22 14:00:23 +02:00
Oliver Falk
13165579e8 Add performance tests for produciton (merge latest development efforts) 2025-10-22 12:52:29 +02:00
Oliver Falk
6db3450b20 Enhance the version endpoint and fix OTEL deployment 2025-10-17 14:49:10 +02:00
Oliver Falk
780dc18fa4 File upload security (iteration 1), security enhancements and OpenTelemetry (OTEL) implementation (sending data disabled by default) 2025-10-17 11:16:48 +02:00