Commit graph

7 commits

Author SHA1 Message Date
b5a39102a6
fix: Comprehensive packet processing and test optimization improvements
This commit includes several critical fixes and optimizations:

## Production Buffer Overflow Fix
- Fixed telemetry_vals data type conversion from strings to integers
- Enhanced put_telemetry_fields() with robust type conversion logic
- Handles mixed data types (string, integer, float) gracefully
- Prevents PacketConsumer GenServer crashes that caused buffer overflow
- Processes telemetry from both data_extended and top-level attrs

## Test Suite Performance Optimization
- Improved test execution speed by 48% (43.2s → 24.1s)
- Increased parallelization: max_cases from 16 to 48
- Optimized database connections and reduced timeouts
- Tagged slow tests and exclude them by default for fast development
- Fixed device seeding to only run when needed
- Enhanced log capture for packet consumer tests

## Code Quality Improvements
- Fixed handle_info clause grouping in LeaderElection
- Ensures mix compile --warnings-as-errors passes
- Added comprehensive telemetry conversion tests
- Improved test reliability and reduced flakiness

## Infrastructure Updates
- Added migration init container to StatefulSet for automatic schema updates
- Disabled AUTO_MIGRATE in main container (handled by init container)
- Created .test-commands with helpful test aliases

This resolves production stability issues and significantly improves development workflow.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 17:50:07 -05:00
b9cb8cf1a3
perf: Optimize test suite for maximum speed
Major performance improvements to test execution:
- Increase max_cases from 16 to 48 for better parallelization
- Increase DB pool size for concurrent tests
- Reduce DB timeouts and enable queue optimization
- Disable logging during tests (level: :error)
- Tag slow tests and exclude them by default
- Only seed devices for tests that need them
- Fixed log capture test for packet consumer
- Fixed flaky leader election test with proper timing

Performance improvements:
- Fast tests: 43.2s -> 24.1s (48% faster)
- All tests still pass with --exclude flags removed
- Created .test-commands with helpful aliases

Usage:
- mix test --exclude slow --exclude integration  # Fast development tests
- mix test  # All tests including slow ones

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-01 17:43:39 -05:00
ce7c50caa1
refactor to use external parser 2025-06-24 14:22:09 -05:00
d6ac5cccfc
fixes 2025-06-21 12:26:43 -05:00
ff9eb9c614 update everything 2025-01-22 12:12:39 -06:00
da296d852d auto style things 2023-12-17 12:11:57 -06:00
d40567dfeb initial 2023-01-26 13:20:23 -06:00