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

Merge branch 'master' of github.com:porter-dev/porter into staging

Soham Parekh 3 лет назад
Родитель
Сommit
cbc9bba8da
2 измененных файлов с 8 добавлено и 2 удалено
  1. 6 0
      cli/cmd/deploy.go
  2. 2 2
      dashboard/src/main/home/Home.tsx

+ 6 - 0
cli/cmd/deploy.go

@@ -491,6 +491,9 @@ func updateFull(_ *types.GetAuthenticatedUserResponse, client *api.Client, args
 	}
 
 	if waitForSuccessfulDeploy {
+		// solves timing issue where replicasets were not on the cluster, before our initial check
+		time.Sleep(10 * time.Second)
+
 		err := checkDeploymentStatus(client)
 
 		if err != nil {
@@ -613,6 +616,9 @@ func updateUpgrade(_ *types.GetAuthenticatedUserResponse, client *api.Client, ar
 	}
 
 	if waitForSuccessfulDeploy {
+		// solves timing issue where replicasets were not on the cluster, before our initial check
+		time.Sleep(10 * time.Second)
+
 		err := checkDeploymentStatus(client)
 
 		if err != nil {

+ 2 - 2
dashboard/src/main/home/Home.tsx

@@ -435,9 +435,9 @@ class Home extends Component<PropsType, StateType> {
                 return <Onboarding />;
               }}
             />
-            {this.context.user.isPorterUser ||
+            {this.context?.user?.isPorterUser ||
             overrideInfraTabEnabled({
-              projectID: this.context.currentProject.id,
+              projectID: this.context?.currentProject?.id,
             }) ? (
               <Route
                 path="/infrastructure"