Skip to content

Commit

Permalink
Merge branch 'main' into metric-scaler-format
Browse files Browse the repository at this point in the history
  • Loading branch information
fira42073 authored Feb 14, 2024
2 parents d1c5c3e + 4da3a5b commit 03656b1
Show file tree
Hide file tree
Showing 994 changed files with 86,672 additions and 13,181 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN apt-get update \
&& mv $HOME/.local/include/ /usr/local/bin/include/ \
&& protoc --version \
# Install golangci-lint
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2 \
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2 \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/3_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ body:
label: KEDA Version
description: What version of KEDA that are you running?
options:
- "2.13.0"
- "2.12.1"
- "2.12.0"
- "2.11.2"
Expand Down
6 changes: 6 additions & 0 deletions .github/ISSUE_TEMPLATE/4_release_tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,16 @@ We aim to release this release in the week of <week range, example March 27-31>.
- [ ] Prepare changelog
- [ ] [Welcome message supported versions](https://github.com/kedacore/keda/blob/main/pkg/util/welcome.go#L29-L30) are up-to-date
- [ ] Add the new version to [GitHub Bug report](https://github.com/kedacore/keda/blob/main/.github/ISSUE_TEMPLATE/3_bug_report.yml) template
- [ ] Best effort version bump for dependencies, example: [#5400](https://github.com/kedacore/keda/pull/5400)
- [ ] Update k8s go modules and pin to the 2nd most recent minor version
- [ ] Check if new Go has been released and if KEDA can be safely built by it
- [ ] Update linters and build pipelines if Go has been bumped, example: [#5399](https://github.com/kedacore/keda/pull/5399)
- [ ] Best effort changelog cleanup, sometimes the notes can be a little inconsistent, example: [#5398](https://github.com/kedacore/keda/pull/5398)
- [ ] Create KEDA release
- [ ] Publish new documentation version
- [ ] Setup continuous container scanning with Snyk
- [ ] Prepare & ship Helm chart
- [ ] Create a new issue in [KEDA OLM repository](https://github.com/kedacore/keda-olm-operator/issues/new/choose)
- [ ] Prepare next release
- [ ] Provide update in Slack
- [ ] Tweet about new release
3 changes: 0 additions & 3 deletions .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,3 @@ closeComment: >
# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

# Limit to only `issues` or `pulls`
only: issues
6 changes: 3 additions & 3 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**

# keda-tools is built from github.com/test-tools/tools/Dockerfile
container: ghcr.io/kedacore/keda-tools:1.21.5
container: ghcr.io/kedacore/keda-tools:1.21.6
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
Expand All @@ -29,13 +29,13 @@ jobs:
echo "build_cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- name: Go modules cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ${{ steps.go-paths.outputs.mod_cache }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Go build cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ${{ steps.go-paths.outputs.build_cache }}
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-e2e-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: label checker
runs-on: ubuntu-latest
steps:
- uses: LouisBrunner/checks-action@v1.6.2
- uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2
name: Enqueue e2e
id: create
with:
Expand All @@ -27,7 +27,7 @@ jobs:
name: ${{ env.E2E_CHECK_NAME }}
status: queued

- uses: LouisBrunner/checks-action@v1.6.2
- uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2
name: Skip e2e
if: ${{ contains(github.event.pull_request.labels.*.name, env.SKIP_E2E_TAG )}}
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-e2e-creator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
name: check-creator
runs-on: ubuntu-latest
steps:
- uses: LouisBrunner/checks-action@v1.6.2
- uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2
name: Enqueue e2e
id: create
with:
Expand All @@ -27,7 +27,7 @@ jobs:
name: ${{ env.E2E_CHECK_NAME }}
status: queued

- uses: LouisBrunner/checks-action@v1.6.2
- uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2
name: Skip e2e
if: ${{ contains(github.event.pull_request.labels.*.name, env.SKIP_E2E_TAG )}}
with:
Expand Down
21 changes: 11 additions & 10 deletions .github/workflows/pr-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ jobs:
id: checkUserMember
with:
username: ${{ github.actor }}
team: 'keda-e2e-test-executors'
team: "keda-e2e-test-executors"
GITHUB_TOKEN: ${{ secrets.GH_CHECKING_USER_AUTH }}

- name: Update comment with the execution url
if: ${{ startsWith(github.event.comment.body,'/run-e2e') && steps.checkUserMember.outputs.isTeamMember == 'true' }}
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
with:
comment-id: ${{ github.event.comment.id }}
body: |
Expand Down Expand Up @@ -68,11 +68,11 @@ jobs:
needs: triage
runs-on: ubuntu-latest
name: Build images
container: ghcr.io/kedacore/keda-tools:1.21.5
container: ghcr.io/kedacore/keda-tools:1.21.6
if: needs.triage.outputs.run-e2e == 'true'
steps:
- name: Set status in-progress
uses: LouisBrunner/checks-action@v1.6.2
uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ needs.triage.outputs.commit_sha }}
Expand Down Expand Up @@ -112,11 +112,11 @@ jobs:
needs: [triage, build-test-images]
runs-on: e2e
name: Execute e2e tests
container: ghcr.io/kedacore/keda-tools:1.21.5
container: ghcr.io/kedacore/keda-tools:1.21.6
if: needs.triage.outputs.run-e2e == 'true'
steps:
- name: Set status in-progress
uses: LouisBrunner/checks-action@v1.6.2
uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ needs.triage.outputs.commit_sha }}
Expand Down Expand Up @@ -155,6 +155,7 @@ jobs:
AZURE_RUN_AAD_POD_IDENTITY_TESTS: true
AZURE_RUN_WORKLOAD_IDENTITY_TESTS: true
GCP_RUN_IDENTITY_TESTS: true
ENABLE_OPENTELEMETRY : true
E2E_IMAGE_TAG: ${{ needs.triage.outputs.image_tag }}
TEST_CLUSTER_NAME: keda-e2e-cluster-pr
COMMENT_BODY: ${{ github.event.comment.body }}
Expand Down Expand Up @@ -190,7 +191,7 @@ jobs:
reaction: "+1"

- name: Set status success
uses: LouisBrunner/checks-action@v1.6.2
uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2
if: steps.test.outcome == 'success'
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -208,7 +209,7 @@ jobs:
reaction: "-1"

- name: Set status failure
uses: LouisBrunner/checks-action@v1.6.2
uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2
if: steps.test.outcome != 'success'
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -218,8 +219,8 @@ jobs:
details_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

- name: Upload test logs
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
with:
name: e2e-test-logs
path: '${{ github.workspace }}/tests/**/*.log'
path: "${{ github.workspace }}/**/*.log"
if-no-files-found: ignore
16 changes: 8 additions & 8 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
validate:
name: validate - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/keda-tools:1.21.5
container: ghcr.io/kedacore/keda-tools:1.21.6
strategy:
matrix:
include:
Expand Down Expand Up @@ -38,13 +38,13 @@ jobs:
echo "build_cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- name: Go modules cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ${{ steps.go-paths.outputs.mod_cache }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Go build cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ${{ steps.go-paths.outputs.build_cache }}
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
validate-dockerfiles:
name: validate-dockerfiles - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/keda-tools:1.21.5
container: ghcr.io/kedacore/keda-tools:1.21.6
strategy:
matrix:
include:
Expand All @@ -90,7 +90,7 @@ jobs:
- name: Register workspace path
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3
id: filter
with:
filters: |
Expand All @@ -104,7 +104,7 @@ jobs:
validate-dev-container:
name: Validate dev-container - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/keda-tools:1.21.5
container: ghcr.io/kedacore/keda-tools:1.21.6
strategy:
matrix:
include:
Expand All @@ -118,7 +118,7 @@ jobs:
- name: Register workspace path
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"

- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3
id: filter
with:
filters: |
Expand All @@ -141,7 +141,7 @@ jobs:
with:
go-version: "1.21"
- name: Get golangci
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
- uses: pre-commit/[email protected]

trivy-scan:
Expand Down
41 changes: 39 additions & 2 deletions .github/workflows/pr-welcome.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ name: PR Welcome Bot

on:
pull_request_target:
types: [opened]
types: [opened, ready_for_review]
branches:
- 'main'
pull_request_review:
types: [submitted, edited]

permissions:
issues: write
Expand All @@ -15,8 +17,21 @@ jobs:
name: PR Bot
runs-on: ubuntu-latest
steps:
- name: 'Comment on PR'
- name: 'Add welcome comment on PR #${{ github.event.number }} (draft)'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
if: github.event_name == 'pull_request_target' && github.event.pull_request.action == 'opened' && github.event.pull_request.draft
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ github.event.number }},
body: 'Thank you for your contribution! 🙏 Let us know when you are ready for a review by publishing the PR.'
});
- name: 'Add welcome comment on PR #${{ github.event.number }}'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
if: github.event_name == 'pull_request_target' && (github.event.pull_request.action == 'opened' || github.event.pull_request.action == 'ready_for_review')
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand All @@ -26,3 +41,25 @@ jobs:
issue_number: ${{ github.event.number }},
body: 'Thank you for your contribution! 🙏 We will review your PR as soon as possible.\n\n\n While you are waiting, make sure to:\n\n\n- Add an entry in [our changelog](https://github.com/kedacore/keda/blob/main/CHANGELOG.md) in alphabetical order and link related issue\n- Update the [documentation](https://github.com/kedacore/keda-docs), if needed\n- Add unit & [e2e](https://github.com/kedacore/keda/blob/main/tests/README.md) tests for your changes\n- GitHub checks are passing\n- Is the DCO check failing? Here is [how you can fix DCO issues](https://github.com/kedacore/keda/blob/main/CONTRIBUTING.md#i-didnt-sign-my-commit-now-what)\n\n\nLearn more about:\n- Our [contribution guide](https://github.com/kedacore/keda/blob/main/CONTRIBUTING.md)'
});
- name: 'Apply review required label'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
if: github.event_name == 'pull_request_target' && (github.event.pull_request.action == 'opened'|| github.event.pull_request.action == 'ready_for_review')
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["requires-pr-review"]
})
- name: 'Remove review required label'
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
if: github.event_name == 'pull_request_review' && (github.event.review.state == 'submitted' || github.event.review.state == 'edited')
with:
script: |
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: "requires-pr-review"
})
6 changes: 3 additions & 3 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
id-token: write # needed for signing the images with GitHub OIDC Token **not production ready**

# keda-tools is built from github.com/test-tools/tools/Dockerfile
container: ghcr.io/kedacore/keda-tools:1.21.5
container: ghcr.io/kedacore/keda-tools:1.21.6
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
Expand All @@ -29,13 +29,13 @@ jobs:
echo "build_cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- name: Go modules cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ${{ steps.go-paths.outputs.mod_cache }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Go build cache
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
with:
path: ${{ steps.go-paths.outputs.build_cache }}
key: ${{ runner.os }}-go-build-cache-${{ hashFiles('**/go.sum') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis-codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
codeQl:
name: Analyze CodeQL Go
runs-on: ubuntu-latest
container: ghcr.io/kedacore/keda-tools:1.21.5
container: ghcr.io/kedacore/keda-tools:1.21.6
if: (github.actor != 'dependabot[bot]')
steps:
- name: Checkout repository
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/template-main-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Run e2e test
runs-on: ARM64
# keda-tools is built from github.com/test-tools/tools/Dockerfile
container: ghcr.io/kedacore/keda-tools:1.21.5
container: ghcr.io/kedacore/keda-tools:1.21.6
concurrency: e2e-tests
steps:
- name: Check out code
Expand All @@ -34,6 +34,7 @@ jobs:
AZURE_RUN_AAD_POD_IDENTITY_TESTS: true
AZURE_RUN_WORKLOAD_IDENTITY_TESTS: true
GCP_RUN_IDENTITY_TESTS: true
ENABLE_OPENTELEMETRY : true
run: make e2e-test

- name: Delete all e2e related namespaces
Expand All @@ -47,9 +48,9 @@ jobs:
NODE_POOL_SIZE: 1

- name: Upload test logs
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
if: ${{ always() }}
with:
name: e2e-test-logs
path: '${{ github.workspace }}/tests/**/*.log'
path: "${{ github.workspace }}/**/*.log"
if-no-files-found: ignore
4 changes: 2 additions & 2 deletions .github/workflows/template-smoke-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ jobs:
run: make smoke-test

- name: Upload test logs
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4
if: ${{ always() }}
with:
name: smoke-test-logs ${{ inputs.runs-on }}-${{ inputs.kubernetesVersion }}
path: "${{ github.workspace }}/tests/**/*.log"
path: "${{ github.workspace }}/**/*.log"
if-no-files-found: ignore
2 changes: 1 addition & 1 deletion .github/workflows/template-trivy-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Run Trivy
uses: aquasecurity/trivy-action@0.16.0
uses: aquasecurity/trivy-action@d43c1f16c00cfd3978dde6c07f4bbcf9eb6993ca # v0.16.1
with:
scan-type: ${{ inputs.scan-type }}
image-ref: ${{ inputs.image-ref }}
Expand Down
Loading

0 comments on commit 03656b1

Please sign in to comment.