Просмотр исходного кода

fe changes for deployment superseded (#4114)

Feroze Mohideen 2 лет назад
Родитель
Сommit
4e1141936f

+ 1 - 0
dashboard/src/lib/revisions/types.ts

@@ -22,6 +22,7 @@ export const appRevisionValidator = z.object({
     "DEPLOYMENT_PROGRESSING",
     "DEPLOYMENT_SUCCESSFUL",
     "DEPLOYMENT_FAILED",
+    "DEPLOYMENT_SUPERSEDED",
     "ROLLBACK_SUCCESSFUL",
     "ROLLBACK_FAILED",
     "ROLLBACK_SKIPPED",

+ 2 - 0
internal/models/app_revision.go

@@ -45,6 +45,8 @@ const (
 	AppRevisionStatus_DeploymentSuccessful AppRevisionStatus = "DEPLOYMENT_SUCCESSFUL"
 	// AppRevisionStatus_DeploymentFailed is the status for a revision that failed to deploy
 	AppRevisionStatus_DeploymentFailed AppRevisionStatus = "DEPLOYMENT_FAILED"
+	// AppRevisionStatus_DeploymentSuperseded is the status for a revision that was superseded by a newer revision
+	AppRevisionStatus_DeploymentSuperseded AppRevisionStatus = "DEPLOYMENT_SUPERSEDED"
 	// AppRevisionStatus_RollbackSuccessful is the status for a revision that successfully rolled back
 	AppRevisionStatus_RollbackSuccessful AppRevisionStatus = "ROLLBACK_SUCCESSFUL"
 	// AppRevisionStatus_RollbackFailed is the status for a revision that failed to rollback

+ 2 - 0
internal/porter_app/revisions.go

@@ -273,6 +273,8 @@ func appRevisionStatusFromProto(status string) (models.AppRevisionStatus, error)
 		appRevisionStatus = models.AppRevisionStatus_DeploymentSuccessful
 	case string(models.AppRevisionStatus_DeploymentFailed):
 		appRevisionStatus = models.AppRevisionStatus_DeploymentFailed
+	case string(models.AppRevisionStatus_DeploymentSuperseded):
+		appRevisionStatus = models.AppRevisionStatus_DeploymentSuperseded
 	case string(models.AppRevisionStatus_RollbackSuccessful):
 		appRevisionStatus = models.AppRevisionStatus_RollbackSuccessful
 	case string(models.AppRevisionStatus_RollbackFailed):