Skip to content

feat: implement rollback for deployments - #155

Merged
vantoan1511 merged 1 commit into
mainfrom
feat/rollback-deployments
Aug 23, 2026
Merged

feat: implement rollback for deployments#155
vantoan1511 merged 1 commit into
mainfrom
feat/rollback-deployments

Conversation

@vantoan1511

Copy link
Copy Markdown
Owner

Summary

Adds a deployment rollback feature in Orbit, allowing users to revert any Kubernetes Deployment to its previous revision directly from the context menu in the UI.

Changes

  • Backend (Rust Engine):
    • Added find_rollback_replicaset to identify the previous revision from owned ReplicaSets based on deployment.kubernetes.io/revision annotations.
    • Added clean_template_for_rollback to sanitize the pod template spec by stripping ephemeral hash labels (pod-template-hash).
    • Added rollback_deployment to patch the Deployment spec template with the target ReplicaSet's template.
    • Added IPC handler rollback_deployment and wired the rollbackDeployment event in the dispatch router.
  • Frontend (Vue/TypeScript):
    • Added rollbackDeployment API wrapper in kubernetesService.ts.
    • Added 'Rollback' action with confirmation prompt in useWorkloadActions.ts.
  • Tests:
    • Added unit tests in core/engine/src/kubernetes/workloads.rs for find_rollback_replicaset and clean_template_for_rollback.

Files Changed

File Change
core/engine/src/kubernetes/workloads.rs Modified
core/engine/src/ipc/handlers/workloads.rs Modified
core/engine/src/ipc/handlers/mod.rs Modified
src/services/kubernetesService.ts Modified
src/composables/useWorkloadActions.ts Modified

Testing

  • Automated: Ran all 22 Rust unit tests (cargo test --package orbit-engine) passing.
  • Static Analysis: Ran vue-tsc --build and cargo check with 0 errors.
  • Lint: Passed eslint . --fix --max-warnings 0.
  • Build: Verified npm run build succeeds without issues.

Related Issues

None

@github-actions github-actions Bot added the feat label Aug 23, 2026
@vantoan1511
vantoan1511 merged commit 3f9c88c into main Aug 23, 2026
2 checks passed
@vantoan1511
vantoan1511 deleted the feat/rollback-deployments branch August 23, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant