-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tmc): introduce uimode in the cli for enhanced cloud fail cases. (
#1150) The Human x Automation UI modes were introduced for different error handling depending on where is the execution.
- Loading branch information
Showing
15 changed files
with
1,044 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright 2023 Terramate GmbH | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
// Package clitest provides constants and errors kind reused by the cli implementation | ||
// and the e2e test infrastructure. | ||
package clitest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Copyright 2023 Terramate GmbH | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package clitest | ||
|
||
import "github.com/terramate-io/terramate/errors" | ||
|
||
const ( | ||
// CloudDisablingMessage is the message displayed in the warning when disabling | ||
// the cloud features. | ||
CloudDisablingMessage = "disabling the cloud features" | ||
|
||
// CloudNoMembershipMessage is the message displayed when the user is not member | ||
// of any organization. | ||
CloudNoMembershipMessage = "You are not member of any organization" | ||
|
||
// CloudSyncDriftFailedMessage is the message displayed when a drift sync fails. | ||
CloudSyncDriftFailedMessage = "failed to sync the drift status" | ||
) | ||
|
||
const ( | ||
// ErrCloud indicates the cloud feature is unprocessable for any reason. | ||
// Depending on the uimode (human x automation) the cli can fatal or skip the | ||
// cloud integration. | ||
ErrCloud errors.Kind = "unprocessable cloud feature" | ||
|
||
// ErrCloudOnboardingIncomplete indicates the onboarding process is incomplete. | ||
ErrCloudOnboardingIncomplete errors.Kind = "cloud commands cannot be used until onboarding is complete" | ||
|
||
// ErrCloudStacksWithoutID indicates that some stacks are missing the ID field. | ||
ErrCloudStacksWithoutID errors.Kind = "all the cloud sync features requires that selected stacks contain an ID field" | ||
) |
Oops, something went wrong.