On Tue, Jan 30, 2024 at 1:07 PM Ilya Maximets <i.maxim...@ovn.org> wrote:

> checkout@v3, cache@v3, setup-python@v4 and setup-go@v3 are using
> outdated Node.js 16 which is now deprecated in GHA [1], so these
> actions may stop working soon.
>
> Updating to most recent major versions with Node.js 20.  This stops
> GHA from throwing warnings in every build.
>
> [1]
> https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
>
> While at it also updating upload-artifact and download-artifact to
> the latest versions.
>
> Removing versions from the upload-artifact comment, since the
> behavior doesn't seem to change much between versions.
>
> New setup-go@v5 attempts to cache dependencies by default.  However,
> the default path it uses is go.sum in the root directory.  This
> triggers a warning, since the file doesn't exist:
>
>   Restore cache failed: Dependencies file is not found in
>   /home/runner/work/ovn-kubernetes/ovn-kubernetes.
>   Supported file pattern: go.sum
>
> Specify a path to all .sum files we have in the repository to make
> the setup-go happy.  This should in theory make the builds a touch
> faster.  This change is in line with recent changes in ovn-kubernetes
> itself.
>
> Signed-off-by: Ilya Maximets <i.maxim...@ovn.org>
> ---
>  .github/workflows/containers.yml              |  2 +-
>  .../workflows/ovn-fake-multinode-tests.yml    | 26 +++++++-------
>  .github/workflows/ovn-kubernetes.yml          | 19 +++++-----
>  .github/workflows/test.yml                    | 36 +++++++++----------
>  4 files changed, 42 insertions(+), 41 deletions(-)
>
> diff --git a/.github/workflows/containers.yml
> b/.github/workflows/containers.yml
> index bdd118087..87e28d645 100644
> --- a/.github/workflows/containers.yml
> +++ b/.github/workflows/containers.yml
> @@ -20,7 +20,7 @@ jobs:
>        matrix:
>          distro: [ fedora, ubuntu ]
>      steps:
> -      - uses: actions/checkout@v3
> +      - uses: actions/checkout@v4
>
>        - name: Update APT cache
>          run: sudo apt update
> diff --git a/.github/workflows/ovn-fake-multinode-tests.yml
> b/.github/workflows/ovn-fake-multinode-tests.yml
> index b3ba82a30..179c1d662 100644
> --- a/.github/workflows/ovn-fake-multinode-tests.yml
> +++ b/.github/workflows/ovn-fake-multinode-tests.yml
> @@ -26,7 +26,7 @@ jobs:
>        XDG_RUNTIME_DIR: ''
>      steps:
>      - name: Check out ovn-fake-multi-node
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          repository: 'ovn-org/ovn-fake-multinode'
>          path: 'ovn-fake-multinode'
> @@ -36,14 +36,14 @@ jobs:
>      # ovn-fake-multinode builds and installs ovs from
> ovn-fake-multinode/ovs
>      # and it builds and installs ovn from ovn-fake-multinode/ovn. It uses
> the ovs submodule for ovn compilation.
>      - name: Check out ovs master
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          path: 'ovn-fake-multinode/ovs'
>          repository: 'openvswitch/ovs'
>          ref: 'master'
>
>      - name: Check out ovn ${{ matrix.cfg.branch }}
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          path: 'ovn-fake-multinode/ovn'
>          submodules: recursive
> @@ -63,7 +63,7 @@ jobs:
>          sudo podman save ovn/ovn-multi-node:${{ matrix.cfg.branch }} >
> /tmp/_output/ovn_${{ matrix.cfg.branch }}_image.tar
>        working-directory: ovn-fake-multinode
>
> -    - uses: actions/upload-artifact@v3
> +    - uses: actions/upload-artifact@v4
>        with:
>          name: test-${{ matrix.cfg.branch }}-image
>          path: /tmp/_output/ovn_${{ matrix.cfg.branch }}_image.tar
> @@ -100,7 +100,7 @@ jobs:
>
>      steps:
>      - name: Check out ovn
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>
>      - name: install required dependencies
>        run:  |
> @@ -112,11 +112,11 @@ jobs:
>          . .ci/linux-util.sh
>          free_up_disk_space_ubuntu
>
> -    - uses: actions/download-artifact@v3
> +    - uses: actions/download-artifact@v4
>        with:
>          name: test-main-image
>
> -    - uses: actions/download-artifact@v3
> +    - uses: actions/download-artifact@v4
>        with:
>          name: test-branch-22.03-image
>
> @@ -126,7 +126,7 @@ jobs:
>          sudo podman load --input ovn_branch-22.03_image.tar
>
>      - name: Check out ovn-fake-multi-node
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          repository: 'ovn-org/ovn-fake-multinode'
>          path: 'ovn-fake-multinode'
> @@ -156,12 +156,12 @@ jobs:
>          echo "$HOME/.local/bin" >> $GITHUB_PATH
>
>      - name: set up python
> -      uses: actions/setup-python@v4
> +      uses: actions/setup-python@v5
>        with:
>          python-version: '3.12'
>
>      - name: Check out ovn
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          path: 'ovn'
>          submodules: recursive
> @@ -190,9 +190,9 @@ jobs:
>      - name: copy logs on failure
>        if: failure() || cancelled()
>        run: |
> -        # upload-artifact@v3 throws exceptions if it tries to upload
> socket
> +        # upload-artifact throws exceptions if it tries to upload socket
>          # files and we could have some socket files in testsuite.dir.
> -        # Also, upload-artifact@v3 doesn't work well enough with
> wildcards.
> +        # Also, upload-artifact doesn't work well enough with wildcards.
>          # So, we're just archiving everything here to avoid any issues.
>          mkdir logs
>          cp ovn/config.log ./logs/
> @@ -203,7 +203,7 @@ jobs:
>
>      - name: upload logs on failure
>        if: failure() || cancelled()
> -      uses: actions/upload-artifact@v3
> +      uses: actions/upload-artifact@v4
>        with:
>          name: logs-linux-${{ join(matrix.cfg.*, '-') }}
>          path: logs.tgz
> diff --git a/.github/workflows/ovn-kubernetes.yml
> b/.github/workflows/ovn-kubernetes.yml
> index 1689396d6..0f2b30497 100644
> --- a/.github/workflows/ovn-kubernetes.yml
> +++ b/.github/workflows/ovn-kubernetes.yml
> @@ -32,12 +32,12 @@ jobs:
>          sudo service docker restart
>
>      - name: Check out ovn
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          submodules: recursive
>
>      - name: Check out ovn-kubernetes
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>            path: src/github.com/ovn-org/ovn-kubernetes
>            repository: ovn-org/ovn-kubernetes
> @@ -54,7 +54,7 @@ jobs:
>          mkdir /tmp/_output
>          docker save ovn-daemonset-f:dev > /tmp/_output/image.tar
>
> -    - uses: actions/upload-artifact@v3
> +    - uses: actions/upload-artifact@v4
>        with:
>          name: test-image
>          path: /tmp/_output/image.tar
> @@ -96,7 +96,7 @@ jobs:
>      steps:
>
>      - name: Check out ovn
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>
>      - name: Free up disk space
>        run: |
> @@ -104,7 +104,7 @@ jobs:
>          free_up_disk_space_ubuntu
>
>      - name: Check out ovn-kubernetes
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>            path: src/github.com/ovn-org/ovn-kubernetes
>            repository: ovn-org/ovn-kubernetes
> @@ -114,9 +114,10 @@ jobs:
>          .ci/ovn-kubernetes/prepare.sh src/
> github.com/ovn-org/ovn-kubernetes $GITHUB_ENV
>
>      - name: Set up Go
> -      uses: actions/setup-go@v3
> +      uses: actions/setup-go@v5
>        with:
>          go-version: ${{ env.GO_VERSION }}
> +        cache-dependency-path: "**/*.sum"
>        id: go
>
>      - name: Set up GOPATH
> @@ -131,7 +132,7 @@ jobs:
>        run: |
>          sudo ufw disable
>
> -    - uses: actions/download-artifact@v3
> +    - uses: actions/download-artifact@v4
>        with:
>          name: test-image
>
> @@ -155,7 +156,7 @@ jobs:
>
>      - name: Upload Junit Reports
>        if: always()
> -      uses: actions/upload-artifact@v3
> +      uses: actions/upload-artifact@v4
>        with:
>          name: kind-junit-${{ env.JOB_NAME }}-${{ github.run_id }}
>          path: 'src/
> github.com/ovn-org/ovn-kubernetes/test/_artifacts/*.xml'
> @@ -169,7 +170,7 @@ jobs:
>
>      - name: Upload logs
>        if: always()
> -      uses: actions/upload-artifact@v3
> +      uses: actions/upload-artifact@v4
>        with:
>          name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }}
>          path: /tmp/kind/logs
> diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
> index 2503d87d0..2def39531 100644
> --- a/.github/workflows/test.yml
> +++ b/.github/workflows/test.yml
> @@ -26,7 +26,7 @@ jobs:
>
>      steps:
>      - name: checkout
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>
>      - name: update PATH
>        run: |
> @@ -54,14 +54,14 @@ jobs:
>
>      - name: cache
>        id: dpdk_cache
> -      uses: actions/cache@v3
> +      uses: actions/cache@v4
>        with:
>          path: dpdk-dir
>          key: ${{ steps.gen_dpdk_key.outputs.key }}
>
>      - name: set up python
>        if: steps.dpdk_cache.outputs.cache-hit != 'true'
> -      uses: actions/setup-python@v4
> +      uses: actions/setup-python@v5
>        with:
>          python-version: '3.9'
>
> @@ -96,7 +96,7 @@ jobs:
>      runs-on: ubuntu-22.04
>
>      steps:
> -      - uses: actions/checkout@v3
> +      - uses: actions/checkout@v4
>
>        - name: Update APT cache
>          run: sudo apt update
> @@ -128,7 +128,7 @@ jobs:
>
>        - name: Cache image
>          id: image_cache
> -        uses: actions/cache@v3
> +        uses: actions/cache@v4
>          with:
>            path: /tmp/image.tar
>            key: ${{ github.sha }}
> @@ -177,20 +177,20 @@ jobs:
>      steps:
>      - name: checkout
>        if: github.event_name == 'push' || github.event_name ==
> 'pull_request'
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          submodules: recursive
>
>      # For weekly runs, don't update submodules
>      - name: checkout without submodule
>        if: github.event_name == 'schedule'
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>
>      # Weekly runs test using the tip of the most recent stable OVS branch
>      # instead of the submodule.
>      - name: checkout OVS
>        if: github.event_name == 'schedule'
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          repository: 'openvswitch/ovs'
>          fetch-depth: 0
> @@ -206,13 +206,13 @@ jobs:
>
>      - name: cache dpdk
>        if: matrix.cfg.dpdk != ''
> -      uses: actions/cache@v3
> +      uses: actions/cache@v4
>        with:
>          path: dpdk-dir
>          key: ${{ needs.build-dpdk.outputs.dpdk_key }}
>
>      - name: image cache
> -      uses: actions/cache@v3
> +      uses: actions/cache@v4
>        with:
>          path: /tmp/image.tar
>          key: ${{ github.sha }}
> @@ -233,7 +233,7 @@ jobs:
>
>      - name: upload logs on failure
>        if: failure() || cancelled()
> -      uses: actions/upload-artifact@v3
> +      uses: actions/upload-artifact@v4
>        with:
>          name: logs-linux-${{ join(matrix.cfg.*, '-') }}
>          path: logs.tgz
> @@ -252,18 +252,18 @@ jobs:
>      steps:
>      - name: checkout
>        if: github.event_name == 'push' || github.event_name ==
> 'pull_request'
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          submodules: recursive
>      # For weekly runs, don't update submodules
>      - name: checkout without submodule
>        if: github.event_name == 'schedule'
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>      # Weekly runs test using the tip of the most recent stable OVS branch
>      # instead of the submodule.
>      - name: checkout OVS
>        if: github.event_name == 'schedule'
> -      uses: actions/checkout@v3
> +      uses: actions/checkout@v4
>        with:
>          repository: 'openvswitch/ovs'
>          fetch-depth: 0
> @@ -282,7 +282,7 @@ jobs:
>          echo "$HOME/bin"        >> $GITHUB_PATH
>          echo "$HOME/.local/bin" >> $GITHUB_PATH
>      - name: set up python
> -      uses: actions/setup-python@v4
> +      uses: actions/setup-python@v5
>        with:
>          python-version: '3.12'
>      - name: prepare
> @@ -291,7 +291,7 @@ jobs:
>        run:  ./.ci/osx-build.sh
>      - name: upload logs on failure
>        if: failure()
> -      uses: actions/upload-artifact@v3
> +      uses: actions/upload-artifact@v4
>        with:
>          name: logs-osx-clang---disable-ssl
>          path: config.log
> @@ -310,7 +310,7 @@ jobs:
>          run: dnf install -y dnf-plugins-core git rpm-build
>
>        - name: checkout
> -        uses: actions/checkout@v3
> +        uses: actions/checkout@v4
>          with:
>            submodules: recursive
>
> @@ -338,7 +338,7 @@ jobs:
>          run:  make rpm-fedora
>
>        - name: upload rpm packages
> -        uses: actions/upload-artifact@v3
> +        uses: actions/upload-artifact@v4
>          with:
>            name: rpm-packages
>            path: |
> --
> 2.43.0
>
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Looks good to me, thanks.

Acked-by: Ales Musil <amu...@redhat.com>

-- 

Ales Musil

Senior Software Engineer - OVN Core

Red Hat EMEA <https://www.redhat.com>

amu...@redhat.com
<https://red.ht/sig>
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to