You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Matcha has detected a stale state file. This means that your local configuration is out of sync with the remote state, the resource group may have been removed."
85
+
"WARNING - Matcha has detected that there are resources already provisioned. Use 'matcha destroy' to remove the existing resources before trying to provision again."
85
86
)
86
87
)
88
+
raisetyper.Exit()
87
89
88
-
ifnottyper.confirm(
89
-
"Do you want to remove the existing local config and continue?"
90
-
):
91
-
raisetyper.Exit()
92
-
93
-
remote_state_manager.remove_matcha_config()
94
-
# Re-initialise remote state manager with empty state file
95
-
remote_state_manager=RemoteStateManager()
96
-
97
-
# Check whether remote state storage has been provisioned
98
-
ifnotremote_state_manager.is_state_provisioned():
90
+
ifnotis_provisioned:
99
91
location, prefix, _=fill_provision_variables(
100
92
location=location, prefix=prefix, password="temp"
101
93
)
102
-
# Provision a state storage if it's not provisioned
Copy file name to clipboardExpand all lines: src/matcha_ml/core/core.py
+7-3Lines changed: 7 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -37,9 +37,11 @@ def get(
37
37
)
38
38
39
39
ifnotmatcha_state_service.state_file_exists:
40
-
raiseMatchaError(
41
-
f"Error - matcha.state file does not exist at {os.path.join(os.getcwd(), '.matcha', 'infrastructure')} . Please run 'matcha provision' before trying to get the resource."
42
-
)
40
+
# if the state file doesn't exist, then download it from the remote
warning_msg=f"\nWARNING: Matcha has detected that a deployment already exists in Azure with the resource group name '{resource_group_name}'. Use 'matcha destroy' to remove these resources before trying to provision."
60
-
confirmation_msg="\nIf you continue, you will create a orphan resource. You should destroy the resources before proceeding.\n\nDo you want to override the existing configuration?"
61
-
else:
62
-
warning_msg="\nMatcha has detected that the you already have resources configured for provisioning."
63
-
confirmation_msg="\nIf you choose to override the existing configuration, the existing configuration will be deleted. Otherwise, the configuration will be reused.\n\nDo you want to override the existing configuration?"
0 commit comments