Skip to content

Commit

Permalink
Merge pull request #32 from jkyros/keda-rebase-2.14
Browse files Browse the repository at this point in the history
PODAUTO-204: Upstream rebase to 2.14.0
  • Loading branch information
openshift-merge-bot[bot] authored Aug 3, 2024
2 parents be1b173 + 9f4d94d commit 00c0517
Show file tree
Hide file tree
Showing 1,932 changed files with 91,921 additions and 53,346 deletions.
2 changes: 1 addition & 1 deletion .ci-operator.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build_root_image:
name: release
namespace: openshift
tag: rhel-9-release-golang-1.21-openshift-4.16
tag: rhel-9-release-golang-1.21-openshift-4.17
53 changes: 19 additions & 34 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.21.5
FROM golang:1.21.12

# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
Expand All @@ -16,42 +16,32 @@ ARG USERNAME=vscode
ARG USER_UID=1000
ARG USER_GID=$USER_UID

ENV GO111MODULE=auto

# Configure apt, install packages and tools
RUN apt-get update \
&& apt-get -y install --no-install-recommends apt-utils dialog unzip 2>&1 \
#
# Verify git, process tools, lsb-release (common in install instructions for CLIs) installed
&& apt-get -y install git iproute2 procps lsb-release \
#
# Install gocode-gomod
&& go get -x -d github.com/stamblerre/gocode 2>&1 \
&& go build -o gocode-gomod github.com/stamblerre/gocode \
&& mv gocode-gomod $GOPATH/bin/ \
#
# Install Go tools
&& go get -u -v \
github.com/mdempsky/gocode \
github.com/uudashr/gopkgs/cmd/gopkgs \
github.com/ramya-rao-a/go-outline \
github.com/acroca/go-symbols \
github.com/godoctor/godoctor \
golang.org/x/tools/cmd/guru \
golang.org/x/tools/cmd/gorename \
github.com/rogpeppe/godef \
github.com/zmb3/gogetdoc \
github.com/haya14busa/goplay/cmd/goplay \
github.com/sqs/goreturns \
github.com/josharian/impl \
github.com/davidrjenni/reftools/cmd/fillstruct \
github.com/fatih/gomodifytags \
github.com/cweill/gotests/... \
golang.org/x/tools/cmd/goimports \
golang.org/x/lint/golint \
github.com/alecthomas/gometalinter 2>&1 \
github.com/mgechev/revive \
github.com/derekparker/delve/cmd/dlv 2>&1 \
&& go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \
&& go install github.com/ramya-rao-a/go-outline@latest \
&& go install github.com/acroca/go-symbols@latest \
&& go install github.com/godoctor/godoctor@latest \
&& go install golang.org/x/tools/cmd/gorename@latest \
&& go install github.com/rogpeppe/godef@latest \
&& go install github.com/zmb3/gogetdoc@latest \
&& go install github.com/haya14busa/goplay/cmd/goplay@latest \
&& go install github.com/sqs/goreturns@latest \
&& go install github.com/josharian/impl@latest \
&& go install github.com/davidrjenni/reftools/cmd/fillstruct@latest \
&& go install github.com/fatih/gomodifytags@latest \
&& go install github.com/cweill/gotests/...@latest \
&& go install golang.org/x/tools/cmd/goimports@latest \
&& go install golang.org/x/lint/golint@latest \
&& go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest \
&& go install github.com/mgechev/revive@latest \
&& go install github.com/go-delve/delve/cmd/dlv@latest \
&& go install honnef.co/go/tools/cmd/staticcheck@latest \
&& go install golang.org/x/tools/gopls@latest \
# Protocol Buffer Compiler
Expand All @@ -62,8 +52,6 @@ RUN apt-get update \
&& mv $HOME/.local/bin/protoc /usr/local/bin/protoc \
&& 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.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 Expand Up @@ -92,9 +80,6 @@ RUN apt-get update \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*

# Enable go modules
ENV GO111MODULE=on

ENV OPERATOR_RELEASE_VERSION=v1.26.0
RUN ARCH=$(case $(uname -m) in x86_64) echo -n amd64 ;; aarch64) echo -n arm64 ;; *) echo -n $(uname -m) ;; esac) \
&& OS=$(uname | awk '{print tolower($0)}') \
Expand Down
24 changes: 3 additions & 21 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.14.0"
- "2.13.1"
- "2.13.0"
- "2.12.1"
Expand All @@ -66,25 +67,7 @@ body:
- "2.11.0"
- "2.10.1"
- "2.10.0"
- "2.9.3"
- "2.9.2"
- "2.9.1"
- "2.9.0"
- "2.8.2"
- "2.8.1"
- "2.8.0"
- "2.7.1"
- "2.7.0"
- "2.6.1"
- "2.6.0"
- "2.5.0"
- "2.4.0"
- "2.3.0"
- "2.2.0"
- "2.1.0"
- "2.0.0"
- "1.5.0"
- "< 1.5.0"
- "< 2.10.0"
- "Other"
validations:
required: false
Expand All @@ -96,8 +79,7 @@ body:
- "1.29"
- "1.28"
- "1.27"
- "1.26"
- "< 1.26"
- "< 1.27"
- "Other"
validations:
required: false
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/4_release_tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ We aim to release this release in the week of <week range, example March 27-31>.
- [ ] 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
2 changes: 1 addition & 1 deletion .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5
with:
go-version: "1.21"
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,10 +13,10 @@ 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.6
container: ghcr.io/kedacore/keda-tools:1.21.12
steps:
- name: Check out code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4
with:
fetch-depth: 1

Expand All @@ -29,13 +29,13 @@ jobs:
echo "build_cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
- name: Go modules cache
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
path: ${{ steps.go-paths.outputs.mod_cache }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Go build cache
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
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
59 changes: 48 additions & 11 deletions .github/workflows/pr-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
image_tag: "pr-${{ steps.parser.outputs.pr_num }}-${{ steps.parser.outputs.commit_sha }}"
commit_sha: ${{ steps.parser.outputs.commit_sha }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4

- uses: tspascoal/get-user-teams-membership@v2
id: checkUserMember
Expand All @@ -27,7 +27,7 @@ jobs:

- 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,19 +68,19 @@ jobs:
needs: triage
runs-on: ubuntu-latest
name: Build images
container: ghcr.io/kedacore/keda-tools:1.21.6
container: ghcr.io/kedacore/keda-tools:1.21.12
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 }}
name: ${{ env.E2E_CHECK_NAME }}
status: in_progress
details_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4

- name: Register workspace path
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand All @@ -93,6 +93,42 @@ jobs:
gh pr checkout ${{ needs.triage.outputs.pr_num }}
git checkout ${{ needs.triage.outputs.commit_sha }}
- name: Run regex checks
id: regex-validation
continue-on-error: true
env:
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
MESSAGE="$COMMENT_BODY"
REGEX='/run-e2e (.+)'
if [[ "$MESSAGE" =~ $REGEX ]]
then
export E2E_TEST_REGEX="$(echo ${BASH_REMATCH[1]} | head -1)"
fi
make e2e-regex-check
- name: React to comment with failure
uses: dkershner6/reaction-action@v2
if: steps.regex-validation.outcome != 'success'
with:
token: ${{ secrets.GITHUB_TOKEN }}
commentId: ${{ github.event.comment.id }}
reaction: "-1"

- name: Set status failure
uses: LouisBrunner/checks-action@6b626ffbad7cc56fd58627f774b9067e6118af23 # v2
if: steps.regex-validation.outcome != 'success'
with:
token: ${{ secrets.GITHUB_TOKEN }}
sha: ${{ needs.triage.outputs.commit_sha }}
name: ${{ env.E2E_CHECK_NAME }}
conclusion: failure
details_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

- name: Exit on failure
if: steps.regex-validation.outcome != 'success'
run: exit 1

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -112,19 +148,19 @@ jobs:
needs: [triage, build-test-images]
runs-on: e2e
name: Execute e2e tests
container: ghcr.io/kedacore/keda-tools:1.21.6
container: ghcr.io/kedacore/keda-tools:1.21.12
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 }}
name: ${{ env.E2E_CHECK_NAME }}
status: in_progress
details_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4

- name: Register workspace path
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
Expand Down Expand Up @@ -155,6 +191,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 +227,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 +245,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,7 +255,7 @@ jobs:
details_url: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}

- name: Upload test logs
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
name: e2e-test-logs
path: "${{ github.workspace }}/**/*.log"
Expand Down
Loading

0 comments on commit 00c0517

Please sign in to comment.