Sfoglia il codice sorgente

[CUS-573] Moving revision culling (#3514)

Stefan McShane 2 anni fa
parent
commit
f3cef35903
2 ha cambiato i file con 22 aggiunte e 2 eliminazioni
  1. 21 1
      .github/workflows/production.yml
  2. 1 1
      internal/kubernetes/config.go

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

@@ -21,7 +21,6 @@ jobs:
         uses: actions/setup-go@v4
         with:
           cache: false
-          go-version: '1.20.5'
           go-version-file: go.mod
       - name: Download Go Modules
         run: go mod download
@@ -102,3 +101,24 @@ jobs:
           project: "5"
           tag: ${{ steps.vars.outputs.sha_short }}
           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 }}

+ 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) {
 	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