diff --git a/.action_templates/e2e-fork-template.yaml b/.action_templates/e2e-fork-template.yaml index c6378cceb..5049c3ff9 100644 --- a/.action_templates/e2e-fork-template.yaml +++ b/.action_templates/e2e-fork-template.yaml @@ -5,23 +5,23 @@ jobs: # dependabot gets a read only github token, and so must use pull_request_target instead of pull_request. if: contains(github.event.pull_request.labels.*.name, 'dependencies') || contains(github.event.pull_request.labels.*.name, 'safe-to-test') steps: - - template: cancel-previous - - template: checkout-fork - - template: setup-and-install-python - - template: quay-login - - template: set-up-qemu + # - template: cancel-previous + # - template: checkout-fork + # - template: setup-and-install-python + # - template: quay-login + # - template: set-up-qemu - template: build-and-push-development-images - template: tests steps: - - template: cancel-previous - - template: checkout-fork - - template: set-run-status - - template: setup-and-install-python - - template: setup-kind-cluster - if: steps.last_run_status.outputs.last_run_status != 'success' - - template: run-test-matrix + # - template: cancel-previous + # - template: checkout-fork + # - template: set-run-status + # - template: setup-and-install-python + # - template: setup-kind-cluster + # if: steps.last_run_status.outputs.last_run_status != 'success' + # - template: run-test-matrix - template: save-run-status - - template: dump-and-upload-diagnostics + # - template: dump-and-upload-diagnostics events: - template: pull-request-target diff --git a/.action_templates/e2e-pr-template.yaml b/.action_templates/e2e-pr-template.yaml index 8c4e79d14..0c9946229 100644 --- a/.action_templates/e2e-pr-template.yaml +++ b/.action_templates/e2e-pr-template.yaml @@ -5,7 +5,7 @@ jobs: # run on master, or if a PR is being created from a branch, or if it has been manually triggered. if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master' || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') steps: - - template: cancel-previous + # - template: cancel-previous - template: checkout - template: setup-and-install-python - template: quay-login @@ -13,7 +13,7 @@ jobs: - template: build-and-push-development-images - template: tests steps: - - template: cancel-previous + # - template: cancel-previous - template: checkout - template: set-run-status - template: setup-and-install-python diff --git a/.action_templates/steps/cancel-previous.yaml b/.action_templates/steps/cancel-previous.yaml index 59ced338b..301d5af50 100644 --- a/.action_templates/steps/cancel-previous.yaml +++ b/.action_templates/steps/cancel-previous.yaml @@ -1,4 +1,4 @@ - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@89f242ee29e10c53a841bfe71cc0ce7b2f065abc # 0.9.0 + uses: styfle/cancel-workflow-action@0.12.1 with: access_token: ${{ github.token }} diff --git a/.action_templates/steps/checkout-fork.yaml b/.action_templates/steps/checkout-fork.yaml index 81b97e54d..abd35041c 100644 --- a/.action_templates/steps/checkout-fork.yaml +++ b/.action_templates/steps/checkout-fork.yaml @@ -2,7 +2,7 @@ # Because we are using pull_request_target the Github Secrets will be passed # So code should be reviewed before labeling as "safe-to-test" - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: ref: ${{github.event.pull_request.head.sha}} repository: ${{github.event.pull_request.head.repo.full_name}} diff --git a/.action_templates/steps/checkout.yaml b/.action_templates/steps/checkout.yaml index 8d3e07859..da02fc2f3 100644 --- a/.action_templates/steps/checkout.yaml +++ b/.action_templates/steps/checkout.yaml @@ -1,4 +1,4 @@ - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true diff --git a/.action_templates/steps/quay-login.yaml b/.action_templates/steps/quay-login.yaml index 85073e70b..77a8dd06f 100644 --- a/.action_templates/steps/quay-login.yaml +++ b/.action_templates/steps/quay-login.yaml @@ -1,5 +1,5 @@ - name: Login to Quay.io - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} diff --git a/.action_templates/steps/set-run-status.yaml b/.action_templates/steps/set-run-status.yaml index 40bb34079..9f4a76541 100644 --- a/.action_templates/steps/set-run-status.yaml +++ b/.action_templates/steps/set-run-status.yaml @@ -7,7 +7,7 @@ # see https://github.com/actions/runner/issues/432 - name: Restore last run status id: last_run - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: last_run_status key: ${{ github.run_id }}-${{ matrix.test-name }}-${{ matrix.distro }} diff --git a/.action_templates/steps/set-up-qemu.yaml b/.action_templates/steps/set-up-qemu.yaml index 7ae0e920a..c84384bfc 100644 --- a/.action_templates/steps/set-up-qemu.yaml +++ b/.action_templates/steps/set-up-qemu.yaml @@ -1,2 +1,2 @@ - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 diff --git a/.action_templates/steps/setup-and-install-python.yaml b/.action_templates/steps/setup-and-install-python.yaml index e97bcf462..b924e01ae 100644 --- a/.action_templates/steps/setup-and-install-python.yaml +++ b/.action_templates/steps/setup-and-install-python.yaml @@ -1,9 +1,9 @@ - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10.4' - name: Cache Dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ hashFiles('requirements.txt') }} diff --git a/.github/workflows/close-stale-issues.yml b/.github/workflows/close-stale-issues.yml index 8a806294a..942020dbd 100644 --- a/.github/workflows/close-stale-issues.yml +++ b/.github/workflows/close-stale-issues.yml @@ -10,7 +10,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v3 + - uses: actions/stale@v9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'This issue is being marked stale because it has been open for 60 days with no activity. Please comment if this issue is still affecting you. If there is no change, this issue will be closed in 30 days.' diff --git a/.github/workflows/code-health.yml b/.github/workflows/code-health.yml index 2f217b968..345941c18 100644 --- a/.github/workflows/code-health.yml +++ b/.github/workflows/code-health.yml @@ -15,7 +15,7 @@ jobs: Mypy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Mypy linting uses: jpetrucciani/mypy-check@179fdad632bf3ccf4cabb7ee4307ef25e51d2f96 @@ -30,4 +30,4 @@ jobs: with: go-version: stable - name: golangci-lint - uses: golangci/golangci-lint-action@v6 \ No newline at end of file + uses: golangci/golangci-lint-action@v6 diff --git a/.github/workflows/comment-release-pr.yml b/.github/workflows/comment-release-pr.yml index 0720856d2..3944aa660 100644 --- a/.github/workflows/comment-release-pr.yml +++ b/.github/workflows/comment-release-pr.yml @@ -9,7 +9,7 @@ jobs: if: startsWith(github.event.pull_request.title, 'Release MongoDB Kubernetes Operator') runs-on: ubuntu-latest steps: - - uses: actions/github-script@v3 + - uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/e2e-dispatch.yml b/.github/workflows/e2e-dispatch.yml index 7ecf8e5b6..b3522124d 100644 --- a/.github/workflows/e2e-dispatch.yml +++ b/.github/workflows/e2e-dispatch.yml @@ -48,16 +48,16 @@ jobs: steps: # template: .action_templates/steps/checkout.yaml - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true # template: .action_templates/steps/setup-and-install-python.yaml - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.10.4 - name: Cache Dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ hashFiles('requirements.txt') }} @@ -65,14 +65,14 @@ jobs: run: pip install -r requirements.txt # template: .action_templates/steps/quay-login.yaml - name: Login to Quay.io - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_ROBOT_TOKEN }} # template: .action_templates/steps/set-up-qemu.yaml - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 # template: .action_templates/steps/build-and-push-development-images.yaml - name: Build and Push Images run: | @@ -87,16 +87,16 @@ jobs: steps: # template: .action_templates/steps/checkout.yaml - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true # template: .action_templates/steps/setup-and-install-python.yaml - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.10.4 - name: Cache Dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ hashFiles('requirements.txt') }} diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml index eede9c4ed..d66737602 100644 --- a/.github/workflows/e2e-fork.yml +++ b/.github/workflows/e2e-fork.yml @@ -41,40 +41,6 @@ jobs: if: contains(github.event.pull_request.labels.*.name, 'dependencies') || contains(github.event.pull_request.labels.*.name, 'safe-to-test') steps: - # template: .action_templates/steps/cancel-previous.yaml - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@89f242ee29e10c53a841bfe71cc0ce7b2f065abc # 0.9.0 - with: - access_token: ${{ github.token }} - # template: .action_templates/steps/checkout-fork.yaml - - name: Checkout Code - uses: actions/checkout@v2 - with: - ref: ${{github.event.pull_request.head.sha}} - repository: ${{github.event.pull_request.head.repo.full_name}} - submodules: true - # template: .action_templates/steps/setup-and-install-python.yaml - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.10.4 - - name: Cache Dependencies - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ hashFiles('requirements.txt') }} - - name: Install Python Dependencies - run: pip install -r requirements.txt - # template: .action_templates/steps/quay-login.yaml - - name: Login to Quay.io - uses: docker/login-action@v1 - with: - registry: quay.io - username: ${{ secrets.QUAY_USERNAME }} - password: ${{ secrets.QUAY_ROBOT_TOKEN }} - # template: .action_templates/steps/set-up-qemu.yaml - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 # template: .action_templates/steps/build-and-push-development-images.yaml - name: Build and Push Images run: | @@ -152,89 +118,8 @@ jobs: - test-name: replica_set_remove_user distro: ubi steps: - # template: .action_templates/steps/cancel-previous.yaml - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@89f242ee29e10c53a841bfe71cc0ce7b2f065abc # 0.9.0 - with: - access_token: ${{ github.token }} - # template: .action_templates/steps/checkout-fork.yaml - - name: Checkout Code - uses: actions/checkout@v2 - with: - ref: ${{github.event.pull_request.head.sha}} - repository: ${{github.event.pull_request.head.repo.full_name}} - submodules: true - # template: .action_templates/steps/set-run-status.yaml - - name: Set default run status - run: echo "::set-output name=last_run_status::pending" > last_run_status - - # Tracking of the state of the previous test run is a workaround to the fact that it is not - # possible to re-run a single failed job, only re-running the entire workflow is currently possible. - # This workaround skips jobs if they have already passed. - # see https://github.com/actions/runner/issues/432 - - name: Restore last run status - id: last_run - uses: actions/cache@v2 - with: - path: last_run_status - key: ${{ github.run_id }}-${{ matrix.test-name }}-${{ matrix.distro }} - - - name: Set last run status - id: last_run_status - run: cat last_run_status - # template: .action_templates/steps/setup-and-install-python.yaml - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: 3.10.4 - - name: Cache Dependencies - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ hashFiles('requirements.txt') }} - - name: Install Python Dependencies - run: pip install -r requirements.txt - # template: .action_templates/steps/setup-kind-cluster.yaml - - name: Setup Kind Cluster - run: | - curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.11.1/kind-linux-amd64 - chmod +x ./kind - ./kind create cluster - if: steps.last_run_status.outputs.last_run_status != 'success' - - name: Create Directories - run: | - docker exec kind-control-plane mkdir -p /opt/data/mongo-data-0 /opt/data/mongo-data-1 /opt/data/mongo-data-2 /opt/data/mongo-logs-0 /opt/data/mongo-logs-1 /opt/data/mongo-logs-2 - - if: steps.last_run_status.outputs.last_run_status != 'success' - - name: Install CRD - run: kubectl apply -f config/crd/bases/mongodbcommunity.mongodb.com_mongodbcommunity.yaml - if: steps.last_run_status.outputs.last_run_status != 'success' - # template: .action_templates/steps/run-test-matrix.yaml - - name: Run Test - id: e2e_test - if: steps.last_run_status.outputs.last_run_status != 'success' - run: | - cluster_wide=${{ matrix.cluster-wide }} - if [ -z "$cluster_wide" ]; then - cluster_wide="false" - fi - python3 ./scripts/dev/e2e.py --test ${{ matrix.test-name }} --tag ${{ github.run_id }} --config_file ./scripts/ci/config.json --distro ${{ matrix.distro }} --cluster-wide ${cluster_wide} # template: .action_templates/steps/save-run-status.yaml - name: Save run status if: always() run: echo "::set-output name=last_run_status::${{ steps.e2e_test.outcome }}" > last_run_status - # template: .action_templates/steps/dump-and-upload-diagnostics.yaml - - name: Dump Diagnostics - id: dump_diagnostics - if: always() && steps.e2e_test.outcome == 'failure' - continue-on-error: true - run: scripts/ci/dump_diagnostics.sh default # default since kind is running in the default namespace - - - name: Upload Diagnostics - if: always() && steps.dump_diagnostics.outcome == 'success' - uses: actions/upload-artifact@v4 - continue-on-error: true - with: - name: ${{ matrix.test-name }}-${{ matrix.distro }}-diagnostics - path: ${{ github.workspace }}/diagnostics diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6eb0a6d53..3d9b07fe4 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -49,23 +49,18 @@ jobs: || (github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'dependabot[bot]') steps: - # template: .action_templates/steps/cancel-previous.yaml - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@89f242ee29e10c53a841bfe71cc0ce7b2f065abc # 0.9.0 - with: - access_token: ${{ github.token }} # template: .action_templates/steps/checkout.yaml - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true # template: .action_templates/steps/setup-and-install-python.yaml - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.10.4 - name: Cache Dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ hashFiles('requirements.txt') }} @@ -73,14 +68,14 @@ jobs: run: pip install -r requirements.txt # template: .action_templates/steps/quay-login.yaml - name: Login to Quay.io - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: registry: quay.io username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_ROBOT_TOKEN }} # template: .action_templates/steps/set-up-qemu.yaml - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 # template: .action_templates/steps/build-and-push-development-images.yaml - name: Build and Push Images run: | @@ -158,14 +153,9 @@ jobs: - test-name: replica_set_remove_user distro: ubi steps: - # template: .action_templates/steps/cancel-previous.yaml - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@89f242ee29e10c53a841bfe71cc0ce7b2f065abc # 0.9.0 - with: - access_token: ${{ github.token }} # template: .action_templates/steps/checkout.yaml - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: submodules: true # template: .action_templates/steps/set-run-status.yaml @@ -178,7 +168,7 @@ jobs: # see https://github.com/actions/runner/issues/432 - name: Restore last run status id: last_run - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: last_run_status key: ${{ github.run_id }}-${{ matrix.test-name }}-${{ matrix.distro }} @@ -188,11 +178,11 @@ jobs: run: cat last_run_status # template: .action_templates/steps/setup-and-install-python.yaml - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: 3.10.4 - name: Cache Dependencies - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ hashFiles('requirements.txt') }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c02456101..ecce33378 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -9,10 +9,10 @@ jobs: UnitTests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Go - uses: actions/setup-go@v4 + uses: actions/setup-go@v5 with: go-version: '1.24' diff --git a/.github/workflows/kubelinter-check.yml b/.github/workflows/kubelinter-check.yml index b4ef431fd..2fcb5b725 100644 --- a/.github/workflows/kubelinter-check.yml +++ b/.github/workflows/kubelinter-check.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Scan directory ./deploy/clusterwide/ with kube-linter uses: stackrox/kube-linter-action@v1.0.3 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 75e310255..3442f28df 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -36,7 +36,7 @@ jobs: # Checkout the code base # ########################## - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: # Make sure we also get the helm-charts submodule! submodules: true diff --git a/.github/workflows/release-images.yml b/.github/workflows/release-images.yml index af38b3181..b0fb77dbc 100644 --- a/.github/workflows/release-images.yml +++ b/.github/workflows/release-images.yml @@ -23,14 +23,14 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10.4' architecture: 'x64' - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ hashFiles('requirements.txt') }} @@ -73,7 +73,7 @@ jobs: needs: [release-images] steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Determine Release Tag id: release_tag run: | diff --git a/.github/workflows/release-single-image.yml b/.github/workflows/release-single-image.yml index 11bd5683d..162454391 100644 --- a/.github/workflows/release-single-image.yml +++ b/.github/workflows/release-single-image.yml @@ -13,14 +13,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: '3.10.4' architecture: 'x64' - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ hashFiles('requirements.txt') }}