Clean up Rollback strategy #29

Merged
JMR-dev merged 2 commits from fix-change-release-rollback-strategy into develop 2025-10-17 02:28:10 +00:00
JMR-dev commented 2025-10-17 02:20:33 +00:00 (Migrated from github.com)
  • Change to git reset --hard after it became clear git revert caused more headaches and did not meaningfully help
- Change to git reset <commitSHA> --hard after it became clear git revert caused more headaches and did not meaningfully help
claude[bot] commented 2025-10-17 02:24:30 +00:00 (Migrated from github.com)

Pull Request Review: Clean up Rollback strategy

Summary

This PR changes the rollback strategy from git revert to git reset --hard, which is a more straightforward approach for cleaning up failed builds.

Positive Changes

  1. Cleaner Rollback Strategy: Using git reset --hard is more appropriate for CI/CD rollbacks
  2. Correct Dependency Chain: Adding merge-develop-to-main to the needs array
  3. Clearer Intent: Error messages accurately reflect the reset operation

Critical Issue: Dependency Mismatch Risk

The rollback job depends on merge-develop-to-main, but build jobs only depend on wait-for-main-pr (lines 514, 609, 711, 832).

Problem: If merge-develop-to-main is skipped (when start_from_step is build-artifacts), previous_main_sha won't exist, causing rollback to fail.

Recommendation: Add fallback logic to compute previous_main_sha when it's not available.

Security Concerns

Force push needs additional safeguards. Consider verifying the commit exists before pushing.

Test Coverage

No automated tests for this workflow logic. Testing the skip scenarios is especially important.

Recommendations

High Priority:

  1. Add fallback logic for when previous_main_sha is not available
  2. Add commit validation before force pushing
  3. Test workflow with start_from_step set to build-artifacts

Medium Priority:
4. Add logging to track rollback events
5. Document the rollback strategy

Overall Assessment

Code Quality: 4/5 - Clean implementation
Security: 3/5 - Needs validation before force push
Reliability: 3/5 - Edge cases need attention
Test Coverage: 2/5 - No automated tests

Approval Status

Recommend approving with minor changes. The core change from revert to reset --hard is sound. Main blocker is ensuring previous_main_sha is available in all execution paths.


Review generated with guidance from CLAUDE.md coding standards

## Pull Request Review: Clean up Rollback strategy ### Summary This PR changes the rollback strategy from git revert to git reset --hard, which is a more straightforward approach for cleaning up failed builds. ### Positive Changes 1. Cleaner Rollback Strategy: Using git reset --hard is more appropriate for CI/CD rollbacks 2. Correct Dependency Chain: Adding merge-develop-to-main to the needs array 3. Clearer Intent: Error messages accurately reflect the reset operation ### Critical Issue: Dependency Mismatch Risk The rollback job depends on merge-develop-to-main, but build jobs only depend on wait-for-main-pr (lines 514, 609, 711, 832). **Problem**: If merge-develop-to-main is skipped (when start_from_step is build-artifacts), previous_main_sha won't exist, causing rollback to fail. **Recommendation**: Add fallback logic to compute previous_main_sha when it's not available. ### Security Concerns Force push needs additional safeguards. Consider verifying the commit exists before pushing. ### Test Coverage No automated tests for this workflow logic. Testing the skip scenarios is especially important. ### Recommendations High Priority: 1. Add fallback logic for when previous_main_sha is not available 2. Add commit validation before force pushing 3. Test workflow with start_from_step set to build-artifacts Medium Priority: 4. Add logging to track rollback events 5. Document the rollback strategy ### Overall Assessment Code Quality: 4/5 - Clean implementation Security: 3/5 - Needs validation before force push Reliability: 3/5 - Edge cases need attention Test Coverage: 2/5 - No automated tests ### Approval Status Recommend approving with minor changes. The core change from revert to reset --hard is sound. Main blocker is ensuring previous_main_sha is available in all execution paths. --- Review generated with guidance from CLAUDE.md coding standards
Sign in to join this conversation.