Skip to content

Commit

Permalink
chore: update timeout for GitHub workflows (#5733)
Browse files Browse the repository at this point in the history
  • Loading branch information
programmer04 authored Mar 27, 2024
1 parent e5b218b commit cefe680
Show file tree
Hide file tree
Showing 29 changed files with 63 additions and 12 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/_conformance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

jobs:
dependencies-versions:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
outputs:
helm-kong: ${{ steps.set-versions.outputs.helm-kong }}
Expand All @@ -24,6 +25,7 @@ jobs:
echo "helm-kong=$(yq -ojson -r '.integration.helm.kong' < .github/test_dependencies.yaml )" >> $GITHUB_OUTPUT
conformance-tests:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
name: ${{ matrix.name }}
runs-on: ubuntu-latest
needs: dependencies-versions
Expand Down Expand Up @@ -52,12 +54,12 @@ jobs:
JUNIT_REPORT: "conformance-tests.xml"
KONG_TEST_EXPRESSION_ROUTES: ${{ matrix.expression_routes }}
TEST_KONG_KIC_MANAGER_LOG_OUTPUT: ${{ inputs.log-output-file }}

# upload logs when test failed
- name: upload KIC logs
- name: upload KIC logs
if: ${{ failure() && inputs.log-output-file != '' }}
uses: actions/upload-artifact@v3
with:
with:
name: ${{ matrix.name }}-kic-logs
path: ${{ inputs.log-output-file }}
if-no-files-found: ignore
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_docker_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ on:

jobs:
prepare-tags:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
outputs:
tags: ${{ steps.merge-tags.outputs.tags }}
Expand Down Expand Up @@ -70,6 +71,7 @@ jobs:
echo "tags: ${{ steps.merge-tags.outputs.tags }}"
build:
timeout-minutes: ${{ fromJSON(vars.GHA_EXTENDED_TIMEOUT_MINUTES) }}
runs-on: ubuntu-latest
needs: prepare-tags
outputs:
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/_e2e_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ on:

jobs:
setup-e2e-tests:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
outputs:
test_names: ${{ steps.set_test_names.outputs.test_names }}
Expand Down Expand Up @@ -69,6 +70,7 @@ jobs:
run: echo "Test names ${{ steps.set_test_names.outputs.test_names }}"

dependencies-versions:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
outputs:
kind: ${{ steps.set-versions.outputs.kind }}
Expand All @@ -90,6 +92,7 @@ jobs:
echo "istio=$(yq -r -ojson '.e2e.istio' < .github/test_dependencies.yaml | jq -c)" >> $GITHUB_OUTPUT
kind:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
needs:
Expand Down Expand Up @@ -186,6 +189,7 @@ jobs:
path: "*-tests.xml"

gke:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
if: ${{ inputs.run-gke }}
environment: "gcloud"
runs-on: ubuntu-latest
Expand Down Expand Up @@ -215,7 +219,7 @@ jobs:
- name: check availability of KIC image
id: check_kic_image
if: ${{ inputs.kic-image != '' }}
# We have to check whether the image passed in inputs is available in the docker hub.
# We have to check whether the image passed in inputs is available in the docker hub.
# If it's not, we'll fall back to a nightly image later.
run: (docker manifest inspect ${{ inputs.kic-image }} && echo "kic_image=${{ inputs.kic-image }}" >> $GITHUB_OUTPUT) || true

Expand All @@ -235,7 +239,7 @@ jobs:
export kic_image_repo=$(echo ${{ steps.check_kic_image.outputs.kic_image }} | awk '{split($0,a,":"); print a[1]}')
export kic_image_tag=$(echo ${{ steps.check_kic_image.outputs.kic_image }} | awk '{split($0,a,":"); print a[2]}')
echo "kic-image=$kic_image_repo" >> $GITHUB_OUTPUT
echo "kic-tag=$kic_image_tag" >> $GITHUB_OUTPUT
echo "kic-tag=$kic_image_tag" >> $GITHUB_OUTPUT
else
# See the https://github.com/Kong/kubernetes-testing-framework/issues/587 TODO below.
# If we add local image GKE support, we can get rid of this fallback.
Expand Down Expand Up @@ -281,6 +285,7 @@ jobs:
path: "*-tests.xml"

istio:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
if: ${{ inputs.run-istio }}
runs-on: ubuntu-latest
needs: dependencies-versions
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_envtest_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
envtest-tests:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- name: checkout repository
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/_integration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ on:

jobs:
dependencies-versions:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
outputs:
kind: ${{ steps.set-versions.outputs.kind }}
Expand All @@ -60,6 +61,7 @@ jobs:
echo "helm-kong=$(yq -ojson -r '.integration.helm.kong' < .github/test_dependencies.yaml )" >> $GITHUB_OUTPUT
integration-tests:
timeout-minutes: ${{ fromJSON(vars.GHA_EXTENDED_TIMEOUT_MINUTES) }}
name: ${{ matrix.name }}
runs-on: ubuntu-latest
needs: dependencies-versions
Expand Down Expand Up @@ -198,12 +200,12 @@ jobs:
name: diagnostics-integration-tests-${{ matrix.name }}
path: /tmp/ktf-diag*
if-no-files-found: ignore

# upload logs when test failed
- name: upload KIC logs
- name: upload KIC logs
if: ${{ failure() && inputs.log-output-file != '' }}
uses: actions/upload-artifact@v3
with:
with:
name: integration-tests-kic-logs-${{ matrix.name }}
path: ${{ inputs.log-output-file }}
if-no-files-found: ignore
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_kongintegration_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
kongintegration-tests:
timeout-minutes: ${{ fromJSON(vars.GHA_EXTENDED_TIMEOUT_MINUTES) }}
runs-on: ubuntu-latest
steps:
- name: checkout repository
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_linters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
lint:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_performance_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ on:

jobs:
performance-matrix:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
if: ${{ inputs.res-number-for-perf == '' }}
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -115,6 +116,7 @@ jobs:
if-no-files-found: ignore

performance-target:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
if: ${{ inputs.res-number-for-perf != '' }}
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/_test_reports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:

jobs:
coverage:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
if: ${{ inputs.coverage && !cancelled() }}
runs-on: ubuntu-latest
steps:
Expand All @@ -41,6 +42,7 @@ jobs:
verbose: true

buildpulse-report:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
if: ${{ inputs.buildpulse && !cancelled() }}
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/_unit_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:

jobs:
unit-tests:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- name: checkout repository
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/backport.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
backport:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
name: Backport
runs-on: ubuntu-latest
# Only react to merged PRs for security reasons.
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/benchmarks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ permissions:

jobs:
benchmark:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
name: Run Go benchmarks
runs-on: ubuntu-latest
steps:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/check_fixed_issues_references.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
check_issues_state:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
permissions:
issues: read
Expand All @@ -17,8 +18,9 @@ jobs:
uses: actions/checkout@v4
- name: check issues
run: ./hack/check_fixed_issues_references.sh

notify-on-slack:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
needs:
- check_issues_state
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check_pr_labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
label:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- uses: pmalek/verify-pr-label-action@v1.4.5
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:

jobs:
up-to-date:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
outputs:
status: ${{ steps.up-to-date.outputs.status }}
Expand All @@ -38,6 +39,7 @@ jobs:

# This job is used to check if the secrets are available. If they are not, we'll skip jobs that require them.
should-run-with-secrets:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
needs:
- up-to-date
Expand All @@ -55,6 +57,7 @@ jobs:
fi
tools:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
needs:
- up-to-date
Expand Down Expand Up @@ -126,6 +129,7 @@ jobs:
# It allows to use this particular job as a required check for PRs.
# Ref: https://github.com/orgs/community/discussions/26822#discussioncomment-3305794
passed:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
needs:
- up-to-date
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
gcloud:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
environment: gcloud
runs-on: ubuntu-latest
steps:
Expand All @@ -24,6 +25,7 @@ jobs:
GOOGLE_LOCATION: ${{ secrets.GOOGLE_LOCATION }}

konnect:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- name: checkout repository
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ on:

jobs:
analyze:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
name: analyze
runs-on: ubuntu-latest
permissions:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/conformance_tests_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:

jobs:
dependencies-versions:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
outputs:
helm-kong: ${{ steps.set-versions.outputs.helm-kong }}
Expand All @@ -28,6 +29,7 @@ jobs:
echo "helm-kong=$(yq -ojson -r '.integration.helm.kong' < .github/test_dependencies.yaml )" >> $GITHUB_OUTPUT
generate-report:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
needs: dependencies-versions
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
ensure-nightly-image-was-built:
timeout-minutes: ${{ fromJSON(vars.GHA_EXTENDED_TIMEOUT_MINUTES) }}
runs-on: ubuntu-latest
steps:
- name: Check if image built this night exists
Expand Down Expand Up @@ -64,6 +65,7 @@ jobs:

notify-on-slack:
runs-on: ubuntu-latest
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
needs:
- ensure-nightly-image-was-built
- e2e-tests
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/e2e_targeted.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ on:

jobs:
post-comment-in-pr:
timeout-minutes: ${{ fromJSON(vars.GHA_EXTENDED_TIMEOUT_MINUTES) }}
if: ${{ github.event.inputs.pr-number != '' }}
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -63,6 +64,7 @@ jobs:
# We need to pick an image to use for the tests. If the input specified one, we use that. Otherwise, we use the one
# built by the previous job.
choose-image:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
if: ${{ !cancelled() }}
needs: build-image
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e_trigger_via_label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:

jobs:
trigger-e2e-tests-targeted:
timeout-minutes: ${{ fromJSON(vars.GHA_EXTENDED_TIMEOUT_MINUTES) }}
if: contains(github.event.*.labels.*.name, 'ci/run-e2e')

runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.K8S_TEAM_BOT_GH_PAT }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
build-push-images:
timeout-minutes: ${{ fromJSON(vars.GHA_EXTENDED_TIMEOUT_MINUTES) }}
environment: 'Docker Push'
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/performance_nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
ensure-nightly-image-was-built:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
steps:
- name: Check if image built this night exists
Expand Down Expand Up @@ -44,6 +45,7 @@ jobs:
coverage: false

notify-on-slack:
timeout-minutes: ${{ fromJSON(vars.GHA_DEFAULT_TIMEOUT) }}
runs-on: ubuntu-latest
needs:
- ensure-nightly-image-was-built
Expand Down
Loading

0 comments on commit cefe680

Please sign in to comment.