fix: setup state is not set due to an exception when initializing the data (#4484)

#### What type of PR is this?

/area console
/kind bug
/milestone 2.9.x

#### What this PR does / why we need it:

修复因为初始化数据异常导致没有记录初始化状态的问题,这个问题可能会导致失败之后无法再让系统正常访问。

#### Does this PR introduce a user-facing change?

```release-note
None
```
pull/4482/head
Ryan Wang 2023-08-25 10:34:14 -05:00 committed by GitHub
parent 63bbd4fa81
commit 03bf2aea7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 4 deletions

View File

@ -113,7 +113,9 @@ async function setupInitialData() {
for (let i = 0; i < presetPlugins.length; i++) {
pluginInstallMutate(presetPlugins[i]);
}
} catch (error) {
console.error(error);
} finally {
await apiClient.extension.configMap.createv1alpha1ConfigMap({
configMap: {
metadata: {
@ -126,9 +128,6 @@ async function setupInitialData() {
},
},
});
} catch (error) {
console.error(error);
} finally {
processing.value = false;
}