Release v1.2.7: Critical batch processing race condition fix

CRITICAL BUG FIX:
- Fixed race condition where only first config file was updated in multi-file scenarios
- Implemented deferred IP storage for atomic batch processing
- All config files now update consistently when IP changes occur

ENHANCED CI/CD TESTING:
- Added comprehensive batch processing validation to test suite
- Increased test coverage from 3 to 5 config files for better detection
- Dynamic IP resolution and detailed error reporting
- Integrated into main test_all.sh for automated CI/CD pipelines

TECHNICAL IMPROVEMENTS:
- Added update_file_only() methods for atomic batch operations
- Enhanced environment variable support for better test infrastructure
- Improved error handling and logging throughout batch processing

This release resolves the critical issue where 'not all config files were being updated'
and ensures reliable, consistent DDNS updates across all configuration files.
This commit is contained in:
koenieee
2025-10-03 15:56:56 +02:00
parent c966351b0f
commit 1c3584cf9a
4 changed files with 155 additions and 1 deletions
+21
View File
@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [1.2.7] - 2025-10-03
### Fixed
- **Critical Batch Processing Race Condition**: Resolved issue where only the first config file was updated in multi-file scenarios
- Implemented deferred IP storage: All config files are processed before storing the new IP
- Added `update_file_only()` methods for atomic batch processing
- Ensures consistent updates across all configuration files containing the old IP
- Eliminates race condition that caused incomplete DDNS updates
### Enhanced
- **Comprehensive CI/CD Testing**: Added robust batch processing validation to test suite
- Enhanced batch processing test with 5 config files (up from 3) for better race condition detection
- Dynamic IP resolution instead of hardcoded values for improved test reliability
- Detailed error reporting with specific failure reasons for better debugging
- Integrated into main test_all.sh script for automated CI/CD pipeline validation
### Improved
- **Environment Variable Support**: Enhanced test mode with proper `DDNS_STORAGE_DIR` support
- Fixed environment variable handling in test mode for better test isolation
- Improved test infrastructure for reliable automated testing
## [1.2.6] - 2025-10-03
### Added
+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "ddns_updater"
version = "1.2.6"
version = "1.2.7"
edition = "2021" # Use 2021 edition for better compatibility
default-run = "ddns_updater"
rust-version = "1.82" # Specify minimum Rust version for Debian 12
+121
View File
@@ -0,0 +1,121 @@
# DDNS Updater v1.2.7 Release Notes
**Release Date**: October 3, 2025
**Type**: Critical Bug Fix + CI/CD Enhancement
## 🚨 Critical Fix
### Batch Processing Race Condition Resolved
- **Issue**: In multi-config file scenarios, only the first config file was being updated
- **Root Cause**: IP was stored immediately after first file update, causing subsequent files to see "no change needed"
- **Solution**: Implemented deferred IP storage - all files are processed first, then IP is stored once atomically
- **Impact**: **All config files now update consistently** when IP changes occur
## 🔧 Technical Improvements
### Enhanced Batch Processing Architecture
- Added `update_file_only()` methods in both application and domain layers
- Implemented atomic update semantics: all files update together or none do
- Improved error handling and rollback capabilities
- Enhanced logging for better debugging of batch operations
### Environment Variable Support
- Fixed `DDNS_STORAGE_DIR` environment variable handling in test mode
- Improved test isolation and reliability
- Better support for automated testing environments
## 🧪 CI/CD Enhancements
### Comprehensive Test Suite Improvements
- **Enhanced batch processing test**: Increased from 3 to 5 config files for better race condition detection
- **Dynamic IP resolution**: Tests adapt to changing DNS resolution (no hardcoded IPs)
- **Detailed error reporting**: Specific failure reasons for better debugging in CI environments
- **Integrated into main test suite**: Runs automatically in CI/CD pipelines
### Test Reliability
- Improved test infrastructure with better cleanup and isolation
- Enhanced error messages for actionable debugging
- Validates atomic update behavior across all configuration files
## 🎯 Production Impact
### Before v1.2.7 (Issue)
```
Config files: site1.conf, site2.conf, site3.conf
Old IP: 192.168.1.100, New IP: 85.146.26.129
Result:
- site1.conf: ✅ Updated to 85.146.26.129
- site2.conf: ❌ Still has 192.168.1.100
- site3.conf: ❌ Still has 192.168.1.100
```
### After v1.2.7 (Fixed)
```
Config files: site1.conf, site2.conf, site3.conf
Old IP: 192.168.1.100, New IP: 85.146.26.129
Result:
- site1.conf: ✅ Updated to 85.146.26.129
- site2.conf: ✅ Updated to 85.146.26.129
- site3.conf: ✅ Updated to 85.146.26.129
```
## 📦 Installation
### Debian/Ubuntu Package
```bash
wget https://github.com/koenieee/ddns_local_server/releases/download/v1.2.7/ddns-updater_1.2.7-1_amd64.deb
sudo dpkg -i ddns-updater_1.2.7-1_amd64.deb
```
### From Source
```bash
git clone https://github.com/koenieee/ddns_local_server.git
cd ddns_local_server
git checkout v1.2.7
cargo build --release
```
## 🔄 Upgrade Notes
### For Production Users
- **Immediate upgrade recommended** if you use multiple config files
- The race condition fix ensures all your config files will be updated consistently
- No configuration changes required - fix is automatic
### For Developers/CI
- Enhanced test suite provides better validation of batch processing
- New environment variable support improves test isolation
- CI/CD pipelines will automatically benefit from improved test coverage
## ⚡ Performance & Compatibility
- **Performance**: No performance impact - fix maintains existing optimizations from v1.2.6
- **Compatibility**: Fully backward compatible with existing configurations
- **Dependencies**: No new dependencies added
- **Rust Version**: Still requires Rust 1.82+ (unchanged)
## 🧰 Developer Notes
### Key Changes
- New methods: `update_ddns_file_only()`, `update_file_only()`
- Enhanced `update_ddns_multiple()` with deferred IP storage
- Improved test infrastructure with dynamic IP detection
- Better error handling and logging throughout batch processing flow
### Testing
```bash
# Run the enhanced test suite
./scripts/test_all.sh
# Test specific batch processing
cargo test batch_processing
```
---
**Full Changelog**: [v1.2.6...v1.2.7](https://github.com/koenieee/ddns_local_server/compare/v1.2.6...v1.2.7)
**Issues Fixed**: Batch processing race condition affecting multi-config deployments
**Contributors**: DDNS Updater Team
+12
View File
@@ -1,3 +1,15 @@
ddns-updater (1.2.7-1) unstable; urgency=medium
* CRITICAL FIX: Resolved batch processing race condition
* Fixed issue where only first config file was updated in multi-file scenarios
* Implemented deferred IP storage for atomic batch processing
* Enhanced CI/CD testing with comprehensive batch processing validation
* Added environment variable support for improved test infrastructure
* Ensures consistent updates across all configuration files
* Eliminates incomplete DDNS updates in production environments
-- DDNS Updater Team <maintainer@example.com> Thu, 03 Oct 2025 14:00:00 +0000
ddns-updater (1.2.6-1) unstable; urgency=medium
* Major performance optimization: Selective config processing