You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by ka...@apache.org on 2021/01/21 20:19:33 UTC

[airflow] 08/44: Artifacts in Github Action have a short retention period (#12793)

This is an automated email from the ASF dual-hosted git repository.

kaxilnaik pushed a commit to branch v1-10-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 0c21aa15bfd58fc6ca57afe5cfebdbf24604a3d5
Author: Kamil BreguĊ‚a <mi...@users.noreply.github.com>
AuthorDate: Fri Dec 4 08:37:38 2020 +0100

    Artifacts in Github Action have a short retention period (#12793)
    
    (cherry picked from commit fa4fc37b966b331377257fe964824914524dba96)
---
 .github/workflows/ci.yml                    | 19 ++++++++++++++++++
 .github/workflows/delete_old_artifacts.yml  | 31 -----------------------------
 .github/workflows/scheduled_quarantined.yml |  2 ++
 3 files changed, 21 insertions(+), 31 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9655955..44ffc7b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -323,18 +323,21 @@ jobs:
         with:
           name: airflow-logs-helm
           path: "./files/airflow_logs*"
+          retention-days: 7
       - name: "Upload container logs"
         uses: actions/upload-artifact@v2
         if: failure()
         with:
           name: container-logs-helm
           path: "./files/container_logs*"
+          retention-days: 7
       - name: "Upload artifact for coverage"
         uses: actions/upload-artifact@v2
         with:
           name: >
             coverage-helm
           path: "./files/coverage.xml"
+          retention-days: 7
 
   tests-postgres:
     timeout-minutes: 80
@@ -376,18 +379,21 @@ jobs:
         with:
           name: airflow-logs-${{matrix.python-version}}-${{matrix.postgres-version}}
           path: "./files/airflow_logs*"
+          retention-days: 7
       - name: "Upload container logs"
         uses: actions/upload-artifact@v2
         if: failure()
         with:
           name: container-logs-postgres-${{matrix.python-version}}-${{matrix.postgres-version}}
           path: "./files/container_logs*"
+          retention-days: 7
       - name: "Upload artifact for coverage"
         uses: actions/upload-artifact@v2
         with:
           name: >
             coverage-postgres-${{matrix.python-version}}-${{matrix.postgres-version}}
           path: "./files/coverage.xml"
+          retention-days: 7
 
   tests-mysql:
     timeout-minutes: 80
@@ -428,17 +434,20 @@ jobs:
         with:
           name: airflow-logs-${{matrix.python-version}}-${{matrix.mysql-version}}
           path: "./files/airflow_logs*"
+          retention-days: 7
       - name: "Upload container logs"
         uses: actions/upload-artifact@v2
         if: failure()
         with:
           name: container-logs-mysql-${{matrix.python-version}}-${{matrix.mysql-version}}
           path: "./files/container_logs*"
+          retention-days: 7
       - name: "Upload artifact for coverage"
         uses: actions/upload-artifact@v2
         with:
           name: coverage-mysql-${{matrix.python-version}}-${{matrix.mysql-version}}
           path: "./files/coverage.xml"
+          retention-days: 7
 
   tests-sqlite:
     timeout-minutes: 60
@@ -477,17 +486,20 @@ jobs:
         with:
           name: airflow-logs-${{matrix.python-version}}
           path: './files/airflow_logs*'
+          retention-days: 7
       - name: "Upload container logs"
         uses: actions/upload-artifact@v2
         if: failure()
         with:
           name: container-logs-sqlite-${{matrix.python-version}}
           path: "./files/container_logs*"
+          retention-days: 7
       - name: "Upload artifact for coverage"
         uses: actions/upload-artifact@v2
         with:
           name: coverage-sqlite-${{matrix.python-version}}
           path: ./files/coverage.xml
+          retention-days: 7
 
   tests-quarantined:
     timeout-minutes: 60
@@ -543,23 +555,27 @@ jobs:
         with:
           name: quarantined_tests
           path: "files/test_result.xml"
+          retention-days: 7
       - name: "Upload airflow logs"
         uses: actions/upload-artifact@v2
         if: failure()
         with:
           name: airflow-logs-quarantined-${{ matrix.backend }}
           path: "./files/airflow_logs*"
+          retention-days: 7
       - name: "Upload container logs"
         uses: actions/upload-artifact@v2
         if: failure()
         with:
           name: container-logs-quarantined-${{ matrix.backend }}
           path: "./files/container_logs*"
+          retention-days: 7
       - name: "Upload artifact for coverage"
         uses: actions/upload-artifact@v2
         with:
           name: coverage-quarantined-${{ matrix.backend }}
           path: "./files/coverage.xml"
+          retention-days: 7
 
   upload-coverage:
     timeout-minutes: 5
@@ -705,12 +721,14 @@ jobs:
           name: >
             kind-logs-${{matrix.kubernetes-mode}}-${{matrix.python-version}}-${{matrix.kubernetes-version}}
           path: /tmp/kind_logs_*
+          retention-days: 7
       - name: "Upload artifact for coverage"
         uses: actions/upload-artifact@v2
         with:
           name: >
             coverage-k8s-${{matrix.kubernetes-mode}}-${{matrix.python-version}}-${{matrix.kubernetes-version}}
           path: "./files/coverage.xml"
+          retention-days: 7
 
   push-prod-images-to-github-registry:
     timeout-minutes: 10
@@ -818,6 +836,7 @@ jobs:
         with:
           name: 'constraints-${{matrix.python-version}}'
           path: './files/constraints-${{matrix.python-version}}/constraints-${{matrix.python-version}}.txt'
+          retention-days: 7
 
   constraints-push:
     timeout-minutes: 10
diff --git a/.github/workflows/delete_old_artifacts.yml b/.github/workflows/delete_old_artifacts.yml
deleted file mode 100644
index 98329d5..0000000
--- a/.github/workflows/delete_old_artifacts.yml
+++ /dev/null
@@ -1,31 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
----
-name: 'Delete old artifacts'
-on:  # yamllint disable-line rule:truthy
-  schedule:
-    - cron: '27 */6 * * *'  # run every 6 hours
-
-jobs:
-  delete-artifacts:
-    runs-on: ubuntu-20.04
-    steps:
-      - uses: kolpav/purge-artifacts-action@04c636a505f26ebc82f8d070b202fb87ff572b10  # v1.0
-        with:
-          token: ${{ secrets.GITHUB_TOKEN }}
-          expire-in: 7days  # Setting this to 0 will delete all artifacts
diff --git a/.github/workflows/scheduled_quarantined.yml b/.github/workflows/scheduled_quarantined.yml
index cf29c38..14dc91d 100644
--- a/.github/workflows/scheduled_quarantined.yml
+++ b/.github/workflows/scheduled_quarantined.yml
@@ -107,9 +107,11 @@ jobs:
         with:
           name: 'quarantined_tests'
           path: 'files/test_result.xml'
+          retention-days: 7
       - uses: actions/upload-artifact@v2
         name: Upload airflow logs
         if: always()
         with:
           name: airflow-logs-quarantined-${{matrix.python-version}}-${{ matrix.postgres-version }}
           path: './files/airflow_logs*'
+          retention-days: 7