|
| 1 | +# dbarena v0.2.1 Release Notes |
| 2 | + |
| 3 | +**Release Date:** 2026-01-24 |
| 4 | +**Type:** Patch Release |
| 5 | + |
| 6 | +## 🐛 Bug Fixes |
| 7 | + |
| 8 | +### Fixed Ctrl+C (SIGINT) Handling |
| 9 | + |
| 10 | +**Issue:** When pressing Ctrl+C to interrupt dbarena, the application did not exit cleanly. This could leave the terminal in an inconsistent state or prevent proper cleanup. |
| 11 | + |
| 12 | +**Fix:** Added proper signal handling for Ctrl+C (SIGINT) using tokio's signal utilities. |
| 13 | + |
| 14 | +**Changes:** |
| 15 | +- Added `tokio::signal::ctrl_c()` handler in main function |
| 16 | +- Uses `tokio::select!` to gracefully handle interruption |
| 17 | +- Exits with standard code 130 for SIGINT |
| 18 | +- Displays user-friendly message: "Interrupted by user (Ctrl+C)" |
| 19 | + |
| 20 | +**Example:** |
| 21 | +```bash |
| 22 | +$ dbarena create postgres |
| 23 | +Creating containers... |
| 24 | +^C |
| 25 | + |
| 26 | +Interrupted by user (Ctrl+C) |
| 27 | +$ # Clean exit, terminal works normally |
| 28 | +``` |
| 29 | + |
| 30 | +## 📦 Installation |
| 31 | + |
| 32 | +### Quick Install |
| 33 | + |
| 34 | +```bash |
| 35 | +curl -sSL https://raw.githubusercontent.com/514-labs/dbareana/main/dbarena/install.sh | bash |
| 36 | +``` |
| 37 | + |
| 38 | +### Manual Download |
| 39 | + |
| 40 | +Download from [GitHub Releases](https://github.com/514-labs/dbareana/releases/tag/v0.2.1): |
| 41 | + |
| 42 | +```bash |
| 43 | +curl -LO https://github.com/514-labs/dbareana/releases/download/v0.2.1/dbarena |
| 44 | +chmod +x dbarena |
| 45 | +sudo mv dbarena /usr/local/bin/ |
| 46 | +``` |
| 47 | + |
| 48 | +### Upgrade from v0.2.0 |
| 49 | + |
| 50 | +If you installed v0.2.0 using the install script, simply run the install script again: |
| 51 | + |
| 52 | +```bash |
| 53 | +curl -sSL https://raw.githubusercontent.com/514-labs/dbareana/main/dbarena/install.sh | bash |
| 54 | +``` |
| 55 | + |
| 56 | +Or manually: |
| 57 | +```bash |
| 58 | +curl -LO https://github.com/514-labs/dbareana/releases/download/v0.2.1/dbarena |
| 59 | +chmod +x dbarena |
| 60 | +sudo mv dbarena /usr/local/bin/dbarena |
| 61 | +``` |
| 62 | + |
| 63 | +## 🔍 Technical Details |
| 64 | + |
| 65 | +### Code Changes |
| 66 | + |
| 67 | +**File:** `src/main.rs` |
| 68 | + |
| 69 | +**Before:** |
| 70 | +```rust |
| 71 | +#[tokio::main] |
| 72 | +async fn main() -> anyhow::Result<()> { |
| 73 | + let cli = Cli::parse(); |
| 74 | + // ... rest of code |
| 75 | +} |
| 76 | +``` |
| 77 | + |
| 78 | +**After:** |
| 79 | +```rust |
| 80 | +#[tokio::main] |
| 81 | +async fn main() -> anyhow::Result<()> { |
| 82 | + let result = tokio::select! { |
| 83 | + result = run() => result, |
| 84 | + _ = tokio::signal::ctrl_c() => { |
| 85 | + eprintln!("\n\nInterrupted by user (Ctrl+C)"); |
| 86 | + std::process::exit(130); |
| 87 | + } |
| 88 | + }; |
| 89 | + result |
| 90 | +} |
| 91 | + |
| 92 | +async fn run() -> anyhow::Result<()> { |
| 93 | + let cli = Cli::parse(); |
| 94 | + // ... rest of code |
| 95 | +} |
| 96 | +``` |
| 97 | + |
| 98 | +### Exit Codes |
| 99 | + |
| 100 | +- **Normal exit:** 0 |
| 101 | +- **Error exit:** 1 |
| 102 | +- **Ctrl+C (SIGINT):** 130 (standard Unix convention: 128 + signal number 2) |
| 103 | + |
| 104 | +## 🧪 Testing |
| 105 | + |
| 106 | +Tested scenarios: |
| 107 | +- ✅ Ctrl+C during interactive menu |
| 108 | +- ✅ Ctrl+C during container creation |
| 109 | +- ✅ Ctrl+C during long-running operations |
| 110 | +- ✅ Normal exit still works (exit code 0) |
| 111 | +- ✅ Error exit still works (exit code 1) |
| 112 | + |
| 113 | +## 📊 What's Changed |
| 114 | + |
| 115 | +- **Files modified:** 2 (Cargo.toml, src/main.rs) |
| 116 | +- **Lines changed:** +14, -1 |
| 117 | +- **New dependencies:** None (uses existing tokio features) |
| 118 | + |
| 119 | +## 🔄 Backwards Compatibility |
| 120 | + |
| 121 | +**100% compatible with v0.2.0** |
| 122 | + |
| 123 | +All v0.2.0 features continue to work exactly as before: |
| 124 | +- Configuration management |
| 125 | +- Initialization scripts |
| 126 | +- SQL execution |
| 127 | +- All CLI commands and flags |
| 128 | + |
| 129 | +This is purely a bug fix release with no breaking changes. |
| 130 | + |
| 131 | +## 📝 Changelog |
| 132 | + |
| 133 | +### v0.2.1 (2026-01-24) |
| 134 | +- **Fixed:** Ctrl+C (SIGINT) now exits cleanly with proper signal handling |
| 135 | + |
| 136 | +### v0.2.0 (2026-01-24) |
| 137 | +- Initial release with configuration management, init scripts, and SQL execution |
| 138 | + |
| 139 | +## 🙏 Credits |
| 140 | + |
| 141 | +Thanks to users who reported the Ctrl+C issue! |
| 142 | + |
| 143 | +**Contributors:** |
| 144 | +- Claude Sonnet 4.5 (Bug fix implementation) |
| 145 | + |
| 146 | +## 📄 License |
| 147 | + |
| 148 | +MIT OR Apache-2.0 |
| 149 | + |
| 150 | +## 🐛 Found a Bug? |
| 151 | + |
| 152 | +Report issues at: https://github.com/514-labs/dbareana/issues |
| 153 | + |
| 154 | +--- |
| 155 | + |
| 156 | +**Full Changelog**: [v0.2.0...v0.2.1](https://github.com/514-labs/dbareana/compare/v0.2.0...v0.2.1) |
0 commit comments