Skip to content

Commit

Permalink
github: Update versions of action dependencies (Node.js 20).
Browse files Browse the repository at this point in the history
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.maximets@ovn.org>
Acked-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
(cherry picked from commit 791affa)
  • Loading branch information
igsilya authored and dceara committed Feb 9, 2024
1 parent 152e9d9 commit 0b7ae04
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 13 additions & 13 deletions .github/workflows/ovn-fake-multinode-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -100,7 +100,7 @@ jobs:

steps:
- name: Check out ovn
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: install required dependencies
run: |
Expand All @@ -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

Expand All @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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/
Expand All @@ -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
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/ovn-kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -96,15 +96,15 @@ jobs:
steps:

- name: Check out ovn
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Free up disk space
run: |
. .ci/linux-util.sh
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
Expand All @@ -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
Expand All @@ -131,7 +132,7 @@ jobs:
run: |
sudo ufw disable
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: test-image

Expand All @@ -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'
Expand All @@ -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
36 changes: 18 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: update PATH
run: |
Expand Down Expand Up @@ -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'

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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: |
Expand Down

0 comments on commit 0b7ae04

Please sign in to comment.