Bump version to 0.5.0, update dependencies, and pin Rust 1.91 in CI#12
Bump version to 0.5.0, update dependencies, and pin Rust 1.91 in CI#12soulgarden merged 3 commits intomainfrom
Conversation
- Update all crate dependencies to latest compatible versions (46 packages) - Sync package version to 0.5.0 across Cargo.toml, VERSION, and Helm charts - Pin CI workflow to Rust 1.91 for consistent builds
📝 WalkthroughWalkthroughSplit CI into lint/test/build with Rust 1.91 pinning and conditional Docker push; bump project and Helm versions to 0.5.0; add Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Developer
participant GitHub as "GitHub (Push/PR)"
participant Runner as "Actions Runner"
participant Cache as "Cargo Cache"
participant Registry as "Docker Registry"
Developer->>GitHub: Push branch or open PR
GitHub->>Runner: Start workflow (push / pull_request)
Runner->>Cache: Restore cargo cache (includes Rust version in key)
Runner->>Runner: Setup Rust 1.91
Runner->>Runner: Lint (cargo fmt, clippy)
Runner->>Runner: Test (cargo test)
alt lint & test succeed
Runner->>Runner: Build job (depends on lint & test)
alt DO_PUSH=true and branch == main
Runner->>Runner: Docker login (conditional)
Runner->>Runner: Docker build (main tags)
Runner->>Registry: Push image
else PR or DO_PUSH=false
Runner->>Runner: Docker build (PR/branch tags, push disabled)
end
else lint/test fail
Runner->>Developer: Workflow fails (logs)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (1)
🧰 Additional context used🧬 Code graph analysis (1)src/infrastructure/metrics/server.rs (1)
🪛 checkmake (0.2.2)Makefile[warning] 3-3: Missing required phony target "all" (minphony) [warning] 3-3: Missing required phony target "clean" (minphony) 🔇 Additional comments (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Split monolithic build job into lint, test, and build stages - Add pull_request trigger for PR validation - Docker push only on main branch (DO_PUSH condition) - Use GitHub Actions cache (type=gha) for non-main builds - Add explicit permissions (contents: read) - Improve clippy check with --all-targets flag - Include Rust version in cache key for consistency
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/main.yml (1)
14-29: Consider updating to Rust 1.92.0, the latest stable release (December 11, 2025).The lint job correctly runs format checks and Clippy with strict warnings. The
--all-targetsflag is good practice to lint tests and examples. However, the workflow is pinned to Rust 1.91, which is one release behind. Update to 1.92.0 unless the earlier version is pinned intentionally for reproducibility.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/main.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: test
- GitHub Check: test
🔇 Additional comments (4)
.github/workflows/main.yml (4)
3-5: LGTM! Good addition of PR validation.Adding the
pull_requesttrigger enables the workflow to run on PRs, providing early feedback before merging.
7-8: LGTM! Good security practice.Explicit
contents: readpermission follows the principle of least privilege. Read-only access is sufficient for this workflow.
10-11: LGTM! Conditional push logic is sound.The
DO_PUSHvariable correctly evaluates to'true'only for pushes to the main branch, preventing Docker pushes from PRs and feature branches.
50-92: LGTM! Well-structured conditional build strategy.The build job is properly gated by lint and test completion. The dual-build approach is excellent:
- PR/branch builds: Use GitHub Actions cache and skip push, providing fast validation without Docker Hub credentials
- Main builds: Push to registry and use registry-based caching for production images
The conditional Docker login (line 61) prevents unnecessary authentication on PRs, improving security and efficiency.
| - name: Run tests | ||
| run: cargo test -- --test-threads=1 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for any comments or documentation about test-threads, single-threaded tests, or concurrency issues
rg -n -C3 'test-threads|single.?thread|sequential.?test|concurrency|shared.?state' --type=rust --type=md --type=toml --type=yamlRepository: soulgarden/logfowd2
Length of output: 984
🏁 Script executed:
#!/bin/bash
# View the complete workflow file to see if there are comments explaining the test configuration
cat -n .github/workflows/main.yml | head -60Repository: soulgarden/logfowd2
Length of output: 1737
🏁 Script executed:
#!/bin/bash
# Find all test files and check their structure
fd -e rs -path '*/test*' -o -path '*/tests/*' | head -20Repository: soulgarden/logfowd2
Length of output: 231
🏁 Script executed:
#!/bin/bash
# Find test files in the repository
find . -name "*.rs" -type f | grep -E "(test|spec)" | head -20Repository: soulgarden/logfowd2
Length of output: 89
🏁 Script executed:
#!/bin/bash
# Search for #[test] attributes and test functions to understand test structure
rg '#\[test\]|mod tests|#\[tokio::test\]' -A 5 --type rustRepository: soulgarden/logfowd2
Length of output: 50376
🏁 Script executed:
#!/bin/bash
# Look for static variables, mutexes, or file I/O in tests that might indicate shared state
rg 'static|mutex|Mutex|File|fs::|shared|LOCK' --type rust -C 2 | head -100Repository: soulgarden/logfowd2
Length of output: 5569
🏁 Script executed:
#!/bin/bash
# Check the integration_tests.rs file for any comments about test execution
head -50 src/integration_tests.rsRepository: soulgarden/logfowd2
Length of output: 1274
🏁 Script executed:
#!/bin/bash
# Search for any TODO, FIXME, or comments that might explain test-threads requirement
rg -i 'todo|fixme|test.*thread|serial|race' src/integration_tests.rsRepository: soulgarden/logfowd2
Length of output: 295
Verify and consider removing the --test-threads=1 flag to improve CI performance.
The --test-threads=1 flag forces sequential test execution, which significantly slows down the CI pipeline. Testing the codebase reveals:
- No comments or documentation explaining why single-threaded execution is required
- Tests use
#[tokio::test]and are designed for concurrent execution - Multiple tests explicitly verify concurrent behavior (e.g.,
test_concurrent_shutdown_components,test_concurrent_producers_consumers) - The application itself prioritizes concurrency optimization ("Lock Contention Minimization", "bounded concurrency")
- No global state, static variables, or resource conflicts that would mandate serialization
This flag should be removed unless there is a specific reason for it.
🤖 Prompt for AI Agents
.github/workflows/main.yml lines 47-48: The workflow forces tests to run
single-threaded via --test-threads=1 which slows CI; remove that flag to allow
parallel test execution unless a known test requires serialization. Edit the Run
tests step to run `cargo test` without the `--test-threads=1` argument, run the
test suite locally/CI to confirm no flakiness, and if any failing tests depend
on single-threading, document the specific test(s) and add targeted fixes or
explicit per-test synchronization instead of a global flag.
- Split Makefile lint into lint (check) and lint_fix (auto-fix) - Update dev_check to use lint_fix for convenience - CI workflow now uses make lint for consistency - Fix collapsible_if warnings using let chains (Rust 2024) - Fix bool_assert_comparison: use assert!(!expr) instead of assert_eq!(expr, false) - Fix assertions_on_constants: remove useless assert!(true) - Fix len_zero: use !is_empty() instead of len() >= 1
Summary by CodeRabbit
Chores
Build/CI
Build Tooling
Tests
✏️ Tip: You can customize this high-level summary in your review settings.