-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1123 from RedisJSON/oshadmi_cp-master-to-2.6-2023…
…1024_2 [2.6] MOD-5985: Cherry-pick from master towards v2.6.7
- Loading branch information
Showing
27 changed files
with
514 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Backport merged pull request | ||
on: | ||
pull_request_target: | ||
types: [closed] | ||
issue_comment: | ||
types: [created] | ||
permissions: | ||
contents: write # so it can comment | ||
pull-requests: write # so it can create pull requests | ||
jobs: | ||
backport: | ||
name: Backport pull request | ||
runs-on: ubuntu-latest | ||
|
||
# Only run when pull request is merged | ||
# or when a comment containing `/backport` is created by someone other than the | ||
# https://github.com/backport-action bot user (user id: 97796249). Note that if you use your | ||
# own PAT as `github_token`, that you should replace this id with yours. | ||
if: > | ||
( | ||
github.event.pull_request.merged | ||
) || ( | ||
github.event_name == 'issue_comment' && | ||
github.event.issue.pull_request && | ||
github.event.comment.user.id != 97796249 && | ||
contains(github.event.comment.body, '/backport') | ||
) | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Create backport pull requests | ||
uses: korthout/backport-action@v1 | ||
with: | ||
pull_title: '[${target_branch}] ${pull_title}' | ||
merge_commits: 'skip' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
name: Run a Benchmark Flow | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
container: | ||
type: string | ||
default: redisfab/rmbuilder:6.2.7-x64-focal | ||
module_path: | ||
type: string | ||
default: bin/linux-x64-release/rejson.so | ||
profile_env: | ||
type: number # for default of 0 | ||
cluster_env: | ||
type: string # for default of "" | ||
benchmark_glob: | ||
type: string | ||
default: "*.yml" | ||
triggering_env: | ||
type: string | ||
default: "circleci" # TODO: change to "github-actions" when ready on grafana | ||
allowed_envs: | ||
type: string | ||
default: "oss-standalone" | ||
allowed_setups: | ||
type: string | ||
benchmark_runner_group_member_id: | ||
type: number | ||
default: 1 | ||
benchmark_runner_group_total: | ||
type: number | ||
default: 1 | ||
|
||
jobs: | ||
benchmark-steps: | ||
runs-on: ubuntu-latest | ||
container: ${{ inputs.container }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- run: | | ||
git init | ||
git config --global --add safe.directory '*' | ||
git submodule update --init --recursive | ||
- name: System setup | ||
run: ./sbin/system-setup.py | ||
|
||
- name: Get Redis | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: redis/redis | ||
ref: '7.2' | ||
path: redis | ||
|
||
- name: Build Redis | ||
working-directory: redis | ||
run: make install | ||
|
||
- name: Build RedisJSON | ||
run: | | ||
. $HOME/.cargo/env | ||
make build | ||
- name: Prepare automation | ||
run: | | ||
./deps/readies/bin/getpy3 | ||
python3 -m pip install -r tests/benchmarks/requirements.txt | ||
VERSION=0.14.8 ./deps/readies/bin/getterraform | ||
- name: Run CI benchmarks on aws for envs ${{ inputs.allowed_envs }} | ||
timeout-minutes: 240 # timeout for the step | ||
working-directory: tests/benchmarks | ||
continue-on-error: true | ||
env: | ||
# Hard-coded | ||
PERF_CALLGRAPH_MODE: dwarf | ||
MAX_PROFILERS: 1 | ||
# Secrets | ||
AWS_ACCESS_KEY_ID: ${{ secrets.PERFORMANCE_EC2_ACCESS_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.PERFORMANCE_EC2_SECRET_KEY }} | ||
AWS_DEFAULT_REGION: ${{ secrets.PERFORMANCE_EC2_REGION }} | ||
EC2_PRIVATE_PEM: ${{ secrets.PERFORMANCE_EC2_PRIVATE_PEM }} | ||
# Inputs | ||
PROFILE: ${{ inputs.profile_env }} | ||
BENCHMARK_GLOB: ${{ inputs.benchmark_glob }} | ||
BENCHMARK_RUNNER_GROUP_M_ID: ${{ inputs.benchmark_runner_group_member_id }} | ||
BENCHMARK_RUNNER_GROUP_TOTAL: ${{ inputs.benchmark_runner_group_total }} | ||
run: redisbench-admin run-remote | ||
--module_path ../../${{ inputs.module_path }} | ||
--github_actor ${{ github.triggering_actor }} | ||
--github_repo ${{ github.event.repository.name }} | ||
--github_org ${{ github.repository_owner }} | ||
--required-module ReJSON | ||
--github_sha ${{ github.sha }} | ||
--github_branch ${{ github.head_ref || github.ref_name }} | ||
--upload_results_s3 | ||
--triggering_env ${{ inputs.triggering_env }} | ||
--allowed-envs ${{ inputs.allowed_envs }} | ||
--allowed-setups ${{ inputs.allowed_setups }} | ||
--push_results_redistimeseries | ||
--redistimeseries_host ${{ secrets.PERFORMANCE_RTS_HOST }} | ||
--redistimeseries_port ${{ secrets.PERFORMANCE_RTS_PORT }} | ||
--redistimeseries_pass '${{ secrets.PERFORMANCE_RTS_AUTH }}' | ||
|
||
- name: Generate Pull Request Performance info | ||
if: github.event.number | ||
env: | ||
PERFORMANCE_GH_TOKEN: ${{ secrets.PERFORMANCE_GH_TOKEN }} | ||
PERFORMANCE_WH_TOKEN: ${{ secrets.PERFORMANCE_WH_TOKEN }} | ||
run: redisbench-admin compare | ||
--defaults_filename ./tests/benchmarks/defaults.yml | ||
--comparison-branch ${{ github.head_ref || github.ref_name }} | ||
--auto-approve | ||
--pull-request ${{ github.event.number }} | ||
--redistimeseries_host ${{ secrets.PERFORMANCE_RTS_HOST }} | ||
--redistimeseries_port ${{ secrets.PERFORMANCE_RTS_PORT }} | ||
--redistimeseries_pass '${{ secrets.PERFORMANCE_RTS_AUTH }}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Run RedisJSON Benchmarks | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
extended: | ||
type: boolean | ||
description: 'Run extended benchmarks' | ||
default: false | ||
workflow_call: | ||
inputs: | ||
extended: | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
benchmark-json-oss-standalone: | ||
strategy: | ||
matrix: | ||
member_id: [1, 2, 3] | ||
uses: ./.github/workflows/benchmark-flow.yml | ||
secrets: inherit | ||
with: | ||
benchmark_runner_group_member_id: ${{ matrix.member_id }} | ||
benchmark_runner_group_total: ${{ strategy.job-total }} | ||
|
||
benchmark-json-oss-standalone-profiler: | ||
strategy: | ||
matrix: | ||
member_id: [1, 2, 3] | ||
uses: ./.github/workflows/benchmark-flow.yml | ||
secrets: inherit | ||
with: | ||
profile_env: 1 | ||
# TODO: change to "github-actions.profilers" when ready on grafana | ||
triggering_env: "circleci.profilers" # results generated with profilers attached are not mixed with the ones without it | ||
benchmark_runner_group_member_id: ${{ matrix.member_id }} | ||
benchmark_runner_group_total: ${{ strategy.job-total }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Check if needs trigger CircleCI benchmark | ||
|
||
on: | ||
pull_request: | ||
types: [opened, labeled, unlabeled, synchronize] | ||
|
||
jobs: | ||
haslabel: | ||
name: analyse labels | ||
runs-on: ubuntu-latest | ||
outputs: | ||
benchmark: ${{ steps.haslabel.outputs.labeled-run-benchmark }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check if labeled with run-benchmark | ||
id: haslabel | ||
uses: DanielTamkin/HasLabel@v1.0.4 | ||
with: | ||
contains: 'run-benchmark' | ||
|
||
perf-ci: | ||
name: Trigger | ||
needs: haslabel | ||
if: needs.haslabel.outputs.benchmark | ||
uses: ./.github/workflows/benchmark-runner.yml | ||
secrets: inherit |
Oops, something went wrong.