Skip to content

Commit

Permalink
Merge branch 'main' into feature/rework-prometheus-metric-names
Browse files Browse the repository at this point in the history
  • Loading branch information
wonko committed Feb 5, 2024
2 parents 36ca55a + 6d326c8 commit 8c97d52
Show file tree
Hide file tree
Showing 3,289 changed files with 208,512 additions and 90,891 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
#-------------------------------------------------------------------------------------------------------------

FROM golang:1.20.8
FROM golang:1.21.5

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand Down 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
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/3_bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ 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"
- "2.11.1"
Expand Down
7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/4_release_tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ 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 template
- [ ] 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
Expand Down
2 changes: 2 additions & 0 deletions .github/cherry-pick-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enabled: true
preservePullRequestTitle: true
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/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version: "1.20"
go-version: "1.21"
- run: go version
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
uses: tj-actions/branch-names@v8
- uses: fossas/fossa-action@main
name: Scanning with FOSSA
with:
Expand Down
8 changes: 4 additions & 4 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.20.8
container: ghcr.io/kedacore/keda-tools:1.21.6
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
Expand All @@ -29,19 +29,19 @@ 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') }}

- name: Go modules sync
run: go mod tidy -compat=1.20
run: go mod tidy -compat=1.21

- name: Test
run: make test
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
27 changes: 14 additions & 13 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 All @@ -36,7 +36,7 @@ jobs:

- name: Add label to skip e2e test
if: ${{ startsWith(github.event.comment.body,'/skip-e2e') && steps.checkUserMember.outputs.isTeamMember == 'true' }}
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
with:
github-token: ${{ secrets.GH_AUTOMATION_PAT }}
script: |
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.20.8
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.20.8
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 @@ -182,15 +183,15 @@ jobs:
TEST_CLUSTER_NAME: keda-e2e-cluster-pr

- name: React to comment with success
uses: dkershner6/reaction-action@v1
uses: dkershner6/reaction-action@v2
if: steps.test.outcome == 'success'
with:
token: ${{ secrets.GITHUB_TOKEN }}
commentId: ${{ github.event.comment.id }}
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 @@ -200,15 +201,15 @@ jobs:
details_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

- name: React to comment with failure
uses: dkershner6/reaction-action@v1
uses: dkershner6/reaction-action@v2
if: steps.test.outcome != 'success'
with:
token: ${{ secrets.GITHUB_TOKEN }}
commentId: ${{ github.event.comment.id }}
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@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4
with:
name: e2e-test-logs
path: '${{ github.workspace }}/tests/**/*.log'
path: "${{ github.workspace }}/**/*.log"
if-no-files-found: ignore
24 changes: 12 additions & 12 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.20.8
container: ghcr.io/kedacore/keda-tools:1.21.6
strategy:
matrix:
include:
Expand Down Expand Up @@ -38,19 +38,19 @@ 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') }}

- name: Go modules sync
run: go mod tidy -compat=1.20
run: go mod tidy -compat=1.21

- name: Verify generated Clientset is up to date
run: make clientset-verify
Expand All @@ -73,7 +73,7 @@ jobs:
validate-dockerfiles:
name: validate-dockerfiles - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/keda-tools:1.20.8
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.20.8
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 @@ -134,14 +134,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: 3.x
- uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version: "1.20"
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
43 changes: 40 additions & 3 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'
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6
- 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"
})
Loading

0 comments on commit 8c97d52

Please sign in to comment.