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

Merge branch 'stacks-v1-porter-yaml-backwards-compatibility' of github.com:porter-dev/porter into stacks-v1-porter-yaml-backwards-compatibility

Feroze Mohideen 2 лет назад
Родитель
Сommit
284926f0f1

+ 21 - 1
.github/workflows/production.yml

@@ -21,7 +21,6 @@ jobs:
         uses: actions/setup-go@v4
         uses: actions/setup-go@v4
         with:
         with:
           cache: false
           cache: false
-          go-version: '1.20.5'
           go-version-file: go.mod
           go-version-file: go.mod
       - name: Download Go Modules
       - name: Download Go Modules
         run: go mod download
         run: go mod download
@@ -102,3 +101,24 @@ jobs:
           project: "5"
           project: "5"
           tag: ${{ steps.vars.outputs.sha_short }}
           tag: ${{ steps.vars.outputs.sha_short }}
           token: ${{ secrets.PORTER_TOKEN_5 }}
           token: ${{ secrets.PORTER_TOKEN_5 }}
+
+  deploy-worker-pool:
+    runs-on: ubuntu-latest
+    needs: [build-go, build-npm] # don't run this step unless these finish successfully
+    steps:
+      - name: Checkout code
+        uses: actions/checkout@v3
+      - name: Set Github tag
+        id: vars
+        run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
+      - name: Update Worker Pool (revision cull job)
+        timeout-minutes: 20
+        uses: porter-dev/porter-update-action@v0.1.0
+        with:
+          app: cull-helm-revisions
+          cluster: "9"
+          host: https://dashboard.internal-tools.porter.run
+          namespace: default
+          project: "5"
+          tag: ${{ steps.vars.outputs.sha_short }}
+          token: ${{ secrets.PORTER_TOKEN_5 }}

+ 10 - 3
dashboard/src/main/home/add-on-dashboard/AddOnDashboard.tsx

@@ -155,8 +155,7 @@ const AddOnDashboard: React.FC<Props> = ({
         <ClusterProvisioningPlaceholder />
         <ClusterProvisioningPlaceholder />
       ) : (
       ) : (
 
 
-
-        (filteredAddOns.length === 0) ? (
+        (addOns.length === 0) ? (
 
 
           isLoading ?
           isLoading ?
             (<Loading offset="-150px" />) : (
             (<Loading offset="-150px" />) : (
@@ -209,7 +208,14 @@ const AddOnDashboard: React.FC<Props> = ({
             </Container>
             </Container>
             <Spacer y={1} />
             <Spacer y={1} />
 
 
-            {isLoading ? <Loading offset="-150px" /> : view === "grid" ? (
+            {filteredAddOns.length === 0 ? (
+              <Fieldset>
+                <Container row>
+                  <PlaceholderIcon src={notFound} />
+                  <Text color="helper">No matching add-ons were found.</Text>
+                </Container>
+              </Fieldset>
+            ) : (isLoading ? <Loading offset="-150px" /> : view === "grid" ? (
               <GridList>
               <GridList>
                 {(filteredAddOns ?? []).map((app: any, i: number) => {
                 {(filteredAddOns ?? []).map((app: any, i: number) => {
                   return (
                   return (
@@ -261,6 +267,7 @@ const AddOnDashboard: React.FC<Props> = ({
                   );
                   );
                 })}
                 })}
               </List>
               </List>
+            )
             )}
             )}
           </>
           </>
         ))}
         ))}

+ 10 - 8
dashboard/src/main/home/add-on-dashboard/NewAddOnFlow.tsx

@@ -192,11 +192,12 @@ const NewAddOnFlow: React.FC<Props> = ({
                           <div>
                           <div>
                             <Text color="helper">For developer productivity.</Text>
                             <Text color="helper">For developer productivity.</Text>
                           </div>
                           </div>
+                          <TemplateList
+                            templates={appTemplates} // This is where you provide only APP templates
+                            setCurrentTemplate={(x) => setCurrentTemplate(x)}
+                          />
                         </>}
                         </>}
-                      <TemplateList
-                        templates={appTemplates} // This is where you provide only APP templates
-                        setCurrentTemplate={(x) => setCurrentTemplate(x)}
-                      />
+
                       {dataStoreTemplates?.length > 0 &&
                       {dataStoreTemplates?.length > 0 &&
                         <>
                         <>
                           <div>
                           <div>
@@ -205,11 +206,12 @@ const NewAddOnFlow: React.FC<Props> = ({
                           <div>
                           <div>
                             <Text color="helper">Pre-production datastores are not highly available and use ephemeral storage.</Text>
                             <Text color="helper">Pre-production datastores are not highly available and use ephemeral storage.</Text>
                           </div>
                           </div>
+                          <TemplateList
+                            templates={dataStoreTemplates} // This is where you provide only DATA_STORE templates
+                            setCurrentTemplate={(x) => setCurrentTemplate(x)}
+                          />
                         </>}
                         </>}
-                      <TemplateList
-                        templates={dataStoreTemplates} // This is where you provide only DATA_STORE templates
-                        setCurrentTemplate={(x) => setCurrentTemplate(x)}
-                      />
+
 
 
                       {filteredTemplates?.length > 0 && (currentProject?.full_add_ons || user.isPorterUser) &&
                       {filteredTemplates?.length > 0 && (currentProject?.full_add_ons || user.isPorterUser) &&
                         <>
                         <>

+ 10 - 3
dashboard/src/main/home/app-dashboard/AppDashboard.tsx

@@ -215,7 +215,7 @@ const AppDashboard: React.FC<Props> = ({ }) => {
       {currentCluster?.status === "UPDATING_UNAVAILABLE" ? (
       {currentCluster?.status === "UPDATING_UNAVAILABLE" ? (
         <ClusterProvisioningPlaceholder />
         <ClusterProvisioningPlaceholder />
       ) : (
       ) : (
-        filteredApps.length === 0 ? (
+        apps.length === 0 ? (
           isLoading ?
           isLoading ?
             (<Loading offset="-150px" />) : (
             (<Loading offset="-150px" />) : (
               <Fieldset>
               <Fieldset>
@@ -283,7 +283,14 @@ const AppDashboard: React.FC<Props> = ({ }) => {
             </Container>
             </Container>
             <Spacer y={1} />
             <Spacer y={1} />
 
 
-            {isLoading ? (
+            {filteredApps.length === 0 ? (
+              <Fieldset>
+                <Container row>
+                  <PlaceholderIcon src={notFound} />
+                  <Text color="helper">No matching apps were found.</Text>
+                </Container>
+              </Fieldset>
+            ) : (isLoading ? (
               <Loading offset="-150px" />
               <Loading offset="-150px" />
             ) : view === "grid" ? (
             ) : view === "grid" ? (
               <GridList>
               <GridList>
@@ -342,7 +349,7 @@ const AppDashboard: React.FC<Props> = ({ }) => {
                   }
                   }
                 })}
                 })}
               </List>
               </List>
-            )}
+            ))}
           </>
           </>
         )
         )
       )
       )

+ 1 - 1
internal/kubernetes/config.go

@@ -400,7 +400,7 @@ func (conf *OutOfClusterConfig) GetClientConfigFromCluster(ctx context.Context)
 
 
 func (conf *OutOfClusterConfig) CreateRawConfigFromCluster(ctx context.Context) (*api.Config, error) {
 func (conf *OutOfClusterConfig) CreateRawConfigFromCluster(ctx context.Context) (*api.Config, error) {
 	ctx, span := telemetry.NewSpan(ctx, "ooc-create-raw-config-from-cluster")
 	ctx, span := telemetry.NewSpan(ctx, "ooc-create-raw-config-from-cluster")
-	defer span.End()
+	// defer span.End() // This span is one of most frequent spans. We need to sample this. For now, this span will not send
 
 
 	cluster := conf.Cluster
 	cluster := conf.Cluster