Skip to content

Commit

Permalink
Merge pull request kedacore#14 from joelsmith/rebase
Browse files Browse the repository at this point in the history
Upstream rebase to 2.11.2
  • Loading branch information
openshift-merge-robot authored Sep 22, 2023
2 parents 341640b + 93acaeb commit acae035
Show file tree
Hide file tree
Showing 3,053 changed files with 267,371 additions and 87,225 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
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-8-release-golang-1.19-openshift-4.13
tag: rhel-8-release-golang-1.20-openshift-4.14
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.19.7
FROM golang:1.20.4

# 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.49.0 \
&& curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.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.11.0"
- "2.10.1"
- "2.10.0"
- "2.9.3"
- "2.9.2"
Expand Down
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/4_release_tracker.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,18 @@ This issue template is used to track the rollout of a new KEDA version.

For the full release process, we recommend reading [this document](https://github.com/kedacore/keda/blob/main/RELEASE-PROCESS.md).

## Required items

- [ ] List items that are still open, but required for this release

# Timeline

We aim to release this release in the week of <week range, example March 27-31>.

## Progress

- [ ] 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
- [ ] Create KEDA release
- [ ] Publish new documentation version
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Get help for KEDA add-on on Azure Kubernetes Service (AKS)
url: https://github.com/azure/aks
about: Ask a question or report a bug for KEDA add-on on Azure Kubernetes Service (AKS)
- name: Ask a question about KEDA or get support
url: https://github.com/kedacore/keda/discussions/new
about: Ask a question or request support for using KEDA
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/auto-add-issues-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- name: Get project data
env:
GITHUB_TOKEN: ${{ secrets.GH_AUTOMATIONS_PAT }}
GITHUB_TOKEN: ${{ secrets.GH_AUTOMATION_PAT }}
ORGANIZATION: kedacore
# This refers to our backlog project: https://github.com/orgs/kedacore/projects/2/views/1
PROJECT_NUMBER: 2
Expand All @@ -34,7 +34,7 @@ jobs:
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
- name: Add issue to project
env:
GITHUB_TOKEN: ${{ secrets.GH_AUTOMATIONS_PAT }}
GITHUB_TOKEN: ${{ secrets.GH_AUTOMATION_PAT }}
ISSUE_ID: ${{ github.event.issue.node_id }}
run: |
item_id="$( gh api graphql -f query='
Expand Down
22 changes: 18 additions & 4 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,33 @@
name: FOSSA

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
fossa-key: 9e722f2c8904586d61f97f0bf05a99e4 # This is a public key only for pushing, it's safe here

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- run: go version
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v7
- uses: fossas/fossa-action@main
name: Scanning with FOSSA
with:
api-key: 9e722f2c8904586d61f97f0bf05a99e4 # This is a public key only for pushing, it's safe here
branch: main
api-key: ${{ env.fossa-key }}
branch: ${{ steps.branch-name.outputs.current_branch }}
- uses: fossas/fossa-action@main
name: Executing tests with FOSSA
with:
api-key: ${{ env.fossa-key }}
run-tests: true
10 changes: 5 additions & 5 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**

# build-tools is built from ../../tools/build-tools.Dockerfile
container: ghcr.io/kedacore/build-tools:1.19.7
container: ghcr.io/kedacore/build-tools:1.20.5
steps:
- name: Check out code
uses: actions/checkout@v3
Expand All @@ -29,19 +29,19 @@ jobs:
echo ::set-output name=build_cache::$(go env GOCACHE)
- name: Go modules cache
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
path: ${{ steps.go-paths.outputs.mod_cache }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Go build cache
uses: actions/[email protected].0
uses: actions/[email protected].1
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.19
run: go mod tidy -compat=1.20

- name: Test
run: make test
Expand All @@ -64,7 +64,7 @@ jobs:

# https://github.com/sigstore/cosign-installer
- name: Install Cosign
uses: sigstore/cosign-installer@v2
uses: sigstore/cosign-installer@v3

- name: Check Cosign install!
run: cosign version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-e2e-checker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: e2e-tests
name: E2E Test Checker
on:
pull_request_target:
types:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-e2e-creator.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: e2e-tests
name: E2E Test Creator
on:
pull_request_target:
types:
Expand Down
36 changes: 31 additions & 5 deletions .github/workflows/pr-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ jobs:
**Update:** You can check the progress [here](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})
reactions: rocket

- name: Add label to skip e2e test
if: ${{ startsWith(github.event.comment.body,'/skip-e2e') && steps.checkUserMember.outputs.isTeamMember == 'true' }}
uses: actions/github-script@v6
with:
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["skip-e2e"]
})
- name: Parse git info
if: ${{ startsWith(github.event.comment.body,'/run-e2e') && steps.checkUserMember.outputs.isTeamMember == 'true' }}
id: parser
Expand All @@ -55,7 +67,7 @@ jobs:
needs: triage
runs-on: ubuntu-latest
name: Build images
container: ghcr.io/kedacore/build-tools:1.19.7
container: ghcr.io/kedacore/build-tools:1.20.5
if: needs.triage.outputs.run-e2e == 'true'
steps:
- name: Set status in-progress
Expand Down Expand Up @@ -98,7 +110,7 @@ jobs:
needs: [triage, build-test-images]
runs-on: e2e
name: Execute e2e tests
container: ghcr.io/kedacore/build-tools:1.19.7
container: ghcr.io/kedacore/build-tools:1.20.5
if: needs.triage.outputs.run-e2e == 'true'
steps:
- name: Set status in-progress
Expand Down Expand Up @@ -126,6 +138,12 @@ jobs:
with:
secrets: ${{ toJSON(secrets) }}

- name: Scale cluster
run: make scale-node-pool
env:
NODE_POOL_SIZE: 4
TEST_CLUSTER_NAME: keda-e2e-cluster-pr

- name: Run end to end tests
continue-on-error: true
id: test
Expand All @@ -135,13 +153,13 @@ jobs:
AZURE_RUN_WORKLOAD_IDENTITY_TESTS: true
GCP_RUN_IDENTITY_TESTS: true
E2E_IMAGE_TAG: ${{ needs.triage.outputs.image_tag }}
TEST_CLUSTER_NAME: keda-pr-run
TEST_CLUSTER_NAME: keda-e2e-cluster-pr
run: |
MESSAGE="${{ github.event.comment.body }}"
REGEX='/run-e2e (.+)'
if [[ "$MESSAGE" =~ $REGEX ]]
then
export E2E_TEST_REGEX="${BASH_REMATCH[1]}"
export E2E_TEST_REGEX="$(echo ${BASH_REMATCH[1]} | head -1)"
fi
echo "${{ needs.triage.outputs.pr_num }}"
make e2e-test
Expand All @@ -150,7 +168,14 @@ jobs:
if: ${{ always() }}
run: make e2e-test-clean
env:
TEST_CLUSTER_NAME: keda-pr-run
TEST_CLUSTER_NAME: keda-e2e-cluster-pr

- name: Scale cluster
if: ${{ always() }}
run: make scale-node-pool
env:
NODE_POOL_SIZE: 1
TEST_CLUSTER_NAME: keda-e2e-cluster-pr

- name: React to comment with success
uses: dkershner6/reaction-action@v1
Expand Down Expand Up @@ -193,3 +218,4 @@ jobs:
with:
name: e2e-test-logs
path: '${{ github.workspace }}/tests/**/*.log'
if-no-files-found: ignore
27 changes: 15 additions & 12 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
validate:
name: validate - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/build-tools:1.19.7
container: ghcr.io/kedacore/build-tools:1.20.5
strategy:
matrix:
include:
Expand Down Expand Up @@ -33,23 +33,26 @@ jobs:
echo ::set-output name=build_cache::$(go env GOCACHE)
- name: Go modules cache
uses: actions/[email protected].0
uses: actions/[email protected].1
with:
path: ${{ steps.go-paths.outputs.mod_cache }}
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }}

- name: Go build cache
uses: actions/[email protected].0
uses: actions/[email protected].1
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.19
run: go mod tidy -compat=1.20

- name: Verify Generated clientset is up to date
- name: Verify generated Clientset is up to date
run: make clientset-verify

- name: Verify generated Manifests are up to date
run: make verify-manifests

- name: Build
run: make build

Expand All @@ -65,7 +68,7 @@ jobs:
validate-dockerfiles:
name: validate-dockerfiles - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/build-tools:1.19.7
container: ghcr.io/kedacore/build-tools:1.20.5
strategy:
matrix:
include:
Expand Down Expand Up @@ -96,7 +99,7 @@ jobs:
validate-build-tools:
name: Validate build-tools - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/build-tools:1.19.7
container: ghcr.io/kedacore/build-tools:1.20.5
strategy:
matrix:
include:
Expand Down Expand Up @@ -133,7 +136,7 @@ jobs:
validate-dev-container:
name: Validate dev-container - ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
container: ghcr.io/kedacore/build-tools:1.19.7
container: ghcr.io/kedacore/build-tools:1.20.5
strategy:
matrix:
include:
Expand Down Expand Up @@ -163,14 +166,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4.5.0
- uses: actions/setup-python@v4.6.1
with:
python-version: 3.x
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: "1.20"
- name: Get golangci
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.2
- uses: pre-commit/[email protected]

trivy-scan:
Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/pr-welcome.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PR Welcome Bot

on:
pull_request_target:
types: [opened]
branches:
- 'main'

permissions:
issues: write
pull-requests: write

jobs:
pr_bot:
name: PR Bot
runs-on: ubuntu-latest
steps:
- name: 'Comment on PR'
uses: actions/github-script@v6
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! 🙏 We will review your PR as soon as possible.\n\n\nWhile 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)'
});
Loading

0 comments on commit acae035

Please sign in to comment.