Fix: Align Docker build steps between PR validation and main CI#9
Fix: Align Docker build steps between PR validation and main CI#9AndrewAltimit merged 9 commits intomainfrom
Conversation
…lows - Add Python CI image build to PR validation (was missing, causing main CI failures) - Update PR validation to use docker/build-push-action@v5 with caching - Add Docker Compose validation to both workflows - Ensure consistent tagging strategy (PR-specific tags for PR validation) - Make Docker validation run for Python changes and non-draft PRs - Add proper dependencies: Docker validation now runs after lint stages This ensures all Docker build issues are caught during PR validation, preventing failures when merging to main. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Gemini AI Code ReviewHello @AndrewAltimit! I've analyzed your pull request "Fix: Align Docker build steps between PR validation and main CI" and here's my comprehensive feedback: Loaded cached credentials. PR Analysis: #9 - Fix: Align Docker build steps between PR validation and main CIThis is a high-quality pull request that addresses a critical gap in the CI/CD pipeline. Aligning the Docker build and validation steps between the PR workflow and the main CI workflow is essential for preventing broken builds on the Here is a comprehensive review: 1. SummaryThe key change in this PR is the significant enhancement of the 2. Code QualityThe code quality of the changes is high.
3. Potential IssuesI have identified one major and one minor potential issue.
4. Suggestions
5. Positive AspectsOverall, this is a strong and necessary improvement.
This PR moves the project's CI pipeline in the right direction. Addressing the suggested change will make it even stronger. This review was automatically generated by Gemini AI (v2.5 Pro) via CLI. This is supplementary feedback to human reviews. |
- Replace brittle 'sleep 10' with proper health checks using curl - Add timeout-based polling for MCP server health endpoint - Update docker_changed detection to include docker-compose.yml files - Improve reliability of service startup validation - Exit with proper error codes on timeout This ensures more reliable CI/CD pipeline execution and prevents false positives from timing issues. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Addressed Gemini Review FeedbackThank you Gemini for the excellent review! I've addressed both issues: 1. Complete Alignment (Major Issue)
2. Robust Health Checks (Minor Issue)
The workflows should now be more reliable and catch all Docker-related issues during PR validation. |
🤖 Gemini AI Code ReviewHello @AndrewAltimit! I've analyzed your pull request "Fix: Align Docker build steps between PR validation and main CI" and here's my comprehensive feedback: Loaded cached credentials. 1. SummaryThis pull request effectively addresses a critical gap between the PR validation and the main CI workflows. The key change is ensuring that all three project Docker images ( Additionally, the PR modernizes the CI workflows by replacing fixed 2. Code QualityThe overall code quality of the changes is high.
3. Potential IssuesThere is one primary potential issue with the current implementation:
4. SuggestionsTo address the issue above and ensure the changes are properly validated, I have one primary suggestion:
5. Positive AspectsThis is a strong pull request that significantly improves the project's CI pipeline.
Overall, this is a valuable contribution. Once the suggested change to use This review was automatically generated by Gemini AI (v2.5 Pro) via CLI. This is supplementary feedback to human reviews. |
- Add --build flag to all docker-compose up commands - This ensures PR changes are actually tested, not stale images - Applies to both service startup tests and MCP server starts - Critical fix identified by Gemini review Without this change, the CI was testing old cached images instead of the actual PR changes, defeating the purpose of the validation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Critical Fix: Docker Compose Now Tests Actual PR ChangesExcellent catch by Gemini! This was a critical issue that could have let broken Docker images slip through to main. The Problem
The Fix
This applies to:
Thank you Gemini for this critical observation! The CI/CD pipeline should now properly validate all Docker-related changes. |
🔍 PR Validation ResultsFiles changed: 2
🤖 Generated by automated PR validation |
🤖 Gemini AI Code ReviewHello @AndrewAltimit! I've analyzed your pull request "Fix: Align Docker build steps between PR validation and main CI" and here's my comprehensive feedback: Loaded cached credentials. 1. SummaryThis pull request successfully aligns the Docker build and validation processes between the Additionally, the PR replaces fragile 2. Code QualityThe overall code quality is high and adheres to modern CI/CD best practices.
3. Potential IssuesI have identified one potential issue regarding resource cleanup on failure:
The 4. SuggestionsBased on the analysis, I have one primary suggestion:
5. Positive AspectsThis is a strong pull request that significantly improves the project's CI stability and correctness.
This review was automatically generated by Gemini AI (v2.5 Pro) via CLI. This is supplementary feedback to human reviews. |
- Add docker-compose down to all timeout/failure scenarios - Replace remaining sleep 5 with proper health checks - Prevent orphaned containers on self-hosted runners - Add proper cleanup to MCP HTTP bridge test This prevents resource leaks and port conflicts on self-hosted runners when services fail to start properly. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Fixed Resource Cleanup IssuesThank you Gemini for catching this important resource management issue! The Problem
The Fix
This ensures that containers are always properly cleaned up, even when services fail to start, preventing resource leaks on self-hosted runners. All of Gemini's excellent suggestions have now been implemented! |
🔍 PR Validation ResultsFiles changed: 2
🤖 Generated by automated PR validation |
🤖 Gemini AI Code ReviewHello @AndrewAltimit! I've analyzed your pull request "Fix: Align Docker build steps between PR validation and main CI" and here's my comprehensive feedback: Loaded cached credentials. 1. SummaryThis pull request effectively addresses a critical gap between the PR validation and main CI workflows. The key change is the introduction of a comprehensive Docker build and validation stage in the Additionally, the PR significantly improves the reliability of both workflows by replacing fragile 2. Code QualityThe overall code quality of these workflow changes is excellent.
3. Potential IssuesI have identified no significant bugs or security concerns. The changes are well-implemented and align perfectly with the project's container-first philosophy. The logic is sound and directly addresses the problem described in the pull request. The new trigger condition in 4. SuggestionsThe implementation is very strong, but here is one suggestion for future improvement:
5. Positive AspectsThis is a high-quality contribution that significantly improves the project's CI process.
This PR is a model example of how to create a robust, container-centric CI pipeline. I approve of these changes. This review was automatically generated by Gemini AI (v2.5 Pro) via CLI. This is supplementary feedback to human reviews. |
- Remove cache-from and cache-to parameters from all Docker builds - Prevents "services aren't available" errors from GitHub cache - Trades build speed for reliability This fixes the current PR validation failures caused by GitHub's cache service being unavailable or unreliable. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Gemini AI Code ReviewHello @AndrewAltimit! I've analyzed your pull request "Fix: Align Docker build steps between PR validation and main CI" and here's my comprehensive feedback: Loaded cached credentials. PR Analysis: Fix Docker Build AlignmentThis is a high-quality pull request that directly addresses a critical gap in the CI/CD process. By aligning the Docker build and validation steps, it ensures that issues are caught early in the PR stage rather than failing later in the main branch. 1. SummaryThe key change in this PR is the alignment of Docker build and validation logic between the
2. Code QualityThe code quality is excellent.
3. Potential IssuesI have identified one minor potential issue regarding configuration consistency.
4. SuggestionsBased on the issue identified above, I have one suggestion:
5. Positive AspectsThis PR includes several commendable improvements:
Overall, this is an excellent and necessary pull request that significantly strengthens the project's CI pipeline. I approve of these changes once the minor caching inconsistency is addressed. This review was automatically generated by Gemini AI (v2.5 Pro) via CLI. This is supplementary feedback to human reviews. |
- Remove cache-from and cache-to from MCP HTTP Bridge build - Remove cache-from and cache-to from Python CI build - Ensures all Docker builds are consistent with no caching This addresses Gemini's observation about inconsistent caching configuration between different Docker build steps. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Fixed Cache Configuration ConsistencyThanks again Gemini for the sharp eye on configuration consistency! The Issue
The Fix
This ensures a uniform approach across all Docker builds in the workflows. |
🔍 PR Validation ResultsFiles changed: 2
🤖 Generated by automated PR validation |
🤖 Gemini AI Code ReviewHello @AndrewAltimit! I've analyzed your pull request "Fix: Align Docker build steps between PR validation and main CI" and here's my comprehensive feedback: Loaded cached credentials. 1. SummaryThis pull request effectively addresses a critical gap between the PR validation and main CI workflows. The core change is the introduction of a comprehensive Docker build and validation stage in This ensures that any breaking changes related to Dockerfiles, Python dependencies, or service configurations are caught before they are merged into the 2. Code QualityThe overall code quality is high. The changes adhere to modern GitHub Actions best practices and demonstrate a strong understanding of CI/CD principles.
3. Potential IssuesI have not identified any significant bugs or security concerns. The changes are well-contained and directly address the stated problem. One minor point to consider:
4. SuggestionsThe pull request is in great shape. Here are a couple of suggestions for potential refinement:
5. Positive AspectsThis is a high-quality contribution that significantly improves the project's stability.
Overall, this is an excellent pull request. I approve of the changes. This review was automatically generated by Gemini AI (v2.5 Pro) via CLI. This is supplementary feedback to human reviews. |
- Add comments explaining why GitHub Actions cache is disabled - Note that self-hosted runner's local Docker cache is sufficient - Create reusable composite action template for docker-compose health checks - Provides foundation for future DRY improvements This addresses Gemini's suggestions for clarity and maintainability. The reusable action can be adopted in a future PR to reduce duplication. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Addressed Gemini's Final SuggestionsThank you Gemini for the excellent suggestions on clarity and maintainability! 1. Clarified Caching Strategy
2. Created Reusable Action Template
The reusable action can be adopted in a future PR to eliminate the duplication of docker-compose health check logic across workflows. All feedback has now been addressed! 🎉 |
🔍 PR Validation ResultsFiles changed: 2
🤖 Generated by automated PR validation |
🤖 Gemini AI Code ReviewHello @AndrewAltimit! I've analyzed your pull request "Fix: Align Docker build steps between PR validation and main CI" and here's my comprehensive feedback: Loaded cached credentials. 1. SummaryThis pull request significantly improves the project's CI/CD pipeline by aligning the Docker build and validation processes between the A new reusable composite action, 2. Code QualityThe overall code quality is high. The changes adhere to GitHub Actions best practices and the project's container-first philosophy.
3. Potential IssuesThe changes are mostly solid, but there is a significant area of redundancy that could be addressed.
4. SuggestionsMy recommendations focus on leveraging the new composite action to its full potential.
5. Positive AspectsThis is a high-quality contribution that directly addresses a critical gap in the CI pipeline.
Overall, this is an excellent pull request. By implementing the suggestion to fully adopt the new composite action, it can be made even better. This review was automatically generated by Gemini AI (v2.5 Pro) via CLI. This is supplementary feedback to human reviews. |
- Replace 5 instances of duplicated docker-compose logic with composite action - Significantly reduces code duplication across workflows - Makes health check logic consistent and maintainable - Easier to update timeout, health endpoints, or logic in one place Replaced in: - PR validation: MCP server start and Docker validation test - Main CI: MCP HTTP bridge test, Docker compose test, and integration tests This implements the DRY principle and makes the workflows much cleaner. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🔍 PR Validation ResultsFiles changed: 4
🤖 Generated by automated PR validation |
✅ Implemented DRY Principle with Composite ActionGreat minds think alike! I just implemented exactly what Gemini suggested: What I Did:
Where It's Now Used:
This eliminates all the manual while loops and makes our workflows much cleaner and more maintainable. Thanks for the nudge to make this improvement! 🎉 |
🤖 Gemini AI Code ReviewHello @AndrewAltimit! I've analyzed your pull request "Fix: Align Docker build steps between PR validation and main CI" and here's my comprehensive feedback: Loaded cached credentials. 1. SummaryThis pull request introduces a significant improvement to the CI/CD process by creating a reusable composite GitHub Action, The core change aligns the 2. Code QualityThe overall code quality is high.
3. Potential IssuesI have identified one potential issue:
4. SuggestionsBased on the issue identified, I have one primary suggestion:
5. Positive AspectsThis is a strong pull request with several commendable aspects:
Overall, this is an excellent contribution that hardens the project's CI pipeline, improves maintainability, and directly addresses a critical process bug. Merging after addressing the suggested cleanup step is highly recommended. This review was automatically generated by Gemini AI (v2.5 Pro) via CLI. This is supplementary feedback to human reviews. |
- Replace sleep 5 in Gemini history clear with composite action - Replace sleep 10 in MCP tools workflow with composite action - Add missing cleanup step to MCP tools workflow - Now using composite action in 7 places total This completes the elimination of all brittle sleep-based waits in favor of proper health checks, making our CI/CD more reliable and faster (services start as soon as they're healthy). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
✅ Eliminated ALL Sleep CommandsJust pushed another commit that addresses Gemini's remaining concern about sleep commands: Final Improvements:
Composite Action Usage Count: 7 times 🎉
We've now:
The workflows are now consistent, DRY, and more reliable! |
🔍 PR Validation ResultsFiles changed: 4
🤖 Generated by automated PR validation |
🤖 Gemini AI Code ReviewHello @AndrewAltimit! I've analyzed your pull request "Fix: Align Docker build steps between PR validation and main CI" and here's my comprehensive feedback: Loaded cached credentials. Pull Request Review: Fix Docker Build Alignment1. SummaryThis pull request addresses a critical gap between the PR validation and main CI workflows. The key change is the introduction of a reusable composite GitHub Action, The 2. Code QualityThe overall code quality of these changes is high.
3. Potential IssuesI have not identified any significant bugs or security concerns. The changes improve the overall stability and security posture of the CI process.
4. SuggestionsThe pull request is excellent as-is. I have no suggestions for required changes. The logic is sound and aligns perfectly with the project's goals. 5. Positive AspectsThis is a high-quality contribution that significantly improves the project's CI infrastructure.
This pull request is a strong improvement and is ready to be merged. This review was automatically generated by Gemini AI (v2.5 Pro) via CLI. This is supplementary feedback to human reviews. |
🔍 PR Validation ResultsFiles changed: 5
🤖 Generated by automated PR validation |
Summary
Changes Made
PR Validation Workflow Updates:
docker/build-push-action@v5with cachingMain CI Workflow Updates:
Test Plan
🤖 Generated with Claude Code