From 3542788a7bb692c309b787d55dba1c857d5eb5a8 Mon Sep 17 00:00:00 2001 From: hugoShaka Date: Tue, 3 Dec 2024 18:13:27 -0500 Subject: [PATCH] fix missing constants + add license --- .../rollout/strategy_haltonerror.go | 26 +++++++++++++++++++ .../rollout/strategy_haltonerror_test.go | 18 +++++++++++++ 2 files changed, 44 insertions(+) diff --git a/lib/autoupdate/rollout/strategy_haltonerror.go b/lib/autoupdate/rollout/strategy_haltonerror.go index 522b1c8cc3b4d..a77d7955a0648 100644 --- a/lib/autoupdate/rollout/strategy_haltonerror.go +++ b/lib/autoupdate/rollout/strategy_haltonerror.go @@ -1,3 +1,21 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package rollout import ( @@ -12,6 +30,14 @@ import ( update "github.com/gravitational/teleport/api/types/autoupdate" ) +const ( + updateReasonCanStart = "can_start" + updateReasonCannotStart = "cannot_start" + updateReasonPreviousGroupsNotDone = "previous_groups_not_done" + updateReasonUpdateComplete = "update_complete" + updateReasonUpdateInProgress = "update_in_progress" +) + type haltOnErrorStrategy struct { log *slog.Logger clock clockwork.Clock diff --git a/lib/autoupdate/rollout/strategy_haltonerror_test.go b/lib/autoupdate/rollout/strategy_haltonerror_test.go index 91b8018228118..d5882f658397e 100644 --- a/lib/autoupdate/rollout/strategy_haltonerror_test.go +++ b/lib/autoupdate/rollout/strategy_haltonerror_test.go @@ -1,3 +1,21 @@ +/* + * Teleport + * Copyright (C) 2024 Gravitational, Inc. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + package rollout import (