Skip to content

Commit 36310f8

Browse files
authored
Merge branch 'main' into mapper-tool
2 parents 05de8c0 + 899d58d commit 36310f8

30 files changed

+1400
-66
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI Knative Setup
2+
description: Sets up the CI environment with Kind, Serving, and Kourier for Knative platform type
3+
inputs:
4+
go-version:
5+
description: Version of Go to set up
6+
required: true
7+
default: '1.22'
8+
runs:
9+
using: "composite"
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@v4
13+
with:
14+
lfs: "true"
15+
16+
- name: Checkout LFS objects
17+
shell: bash
18+
run: git lfs checkout
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: ${{ inputs.go-version }}
24+
25+
- name: Create k8s Kind Cluster
26+
shell: bash
27+
run: bash ./scripts/konk-ci/01-kind.sh
28+
29+
- name: Install Serving
30+
shell: bash
31+
run: bash ./scripts/konk-ci/02-serving.sh
32+
33+
- name: Install Kourier
34+
shell: bash
35+
run: bash ./scripts/konk-ci/02-kourier.sh
36+
37+
- name: Setup domain and autoscaler
38+
shell: bash
39+
run: |
40+
INGRESS_HOST="127.0.0.1"
41+
KNATIVE_DOMAIN=$INGRESS_HOST.sslip.io
42+
kubectl patch configmap -n knative-serving config-domain -p "{\"data\": {\"$KNATIVE_DOMAIN\": \"\"}}"
43+
kubectl patch configmap -n knative-serving config-autoscaler -p "{\"data\": {\"allow-zero-initial-scale\": \"true\"}}"
44+
kubectl patch configmap -n knative-serving config-features -p "{\"data\": {\"kubernetes.podspec-affinity\": \"enabled\"}}"
45+
kubectl label node knative-control-plane loader-nodetype=worker

.github/configs/wordlist.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,3 +798,19 @@ AsyncMode
798798
AsyncResponseURL
799799
AsyncWaitToCollectMin
800800
Knative's
801+
BaseConfigPath
802+
LoaderStudy
803+
LoaderExperiment
804+
PostScript
805+
PreScript
806+
IatGeneration
807+
LoaderConfiguration
808+
PostScript
809+
PreScript
810+
TraceFormat
811+
TraceValues
812+
TracesDir
813+
TracesFormat
814+
baseLoaderConfig
815+
iats
816+
RpsDataSizeMB

.github/workflows/code-quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
uses: actions/checkout@v4
4343

4444
- name: Lint with golangci-lint
45-
uses: golangci/golangci-lint-action@v6.1.0
45+
uses: golangci/golangci-lint-action@v6.3.1
4646
with:
4747
working-directory: ${{ matrix.dir }}
4848
args: --timeout 5m
Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: End-to-End Tests
1+
name: End-to-End Loader Test
22

33
on:
4-
schedule:
5-
- cron: "0 9 * * 1"
6-
workflow_dispatch:
7-
push:
8-
branches: [main]
9-
pull_request:
10-
branches: [main]
4+
schedule:
5+
- cron: "0 9 * * 1"
6+
workflow_dispatch:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
1111

1212
env:
1313
GOOS: linux
@@ -20,7 +20,6 @@ jobs:
2020
KIND_VERSION: v0.22.0
2121
K8S_VERSION: v1.29
2222
YAML_DIR: workloads/container
23-
2423
runs-on: ubuntu-20.04
2524
strategy:
2625
fail-fast: false
@@ -30,33 +29,11 @@ jobs:
3029
trace_func_go,
3130
]
3231
steps:
33-
- uses: actions/checkout@v4
34-
with:
35-
lfs: "true"
36-
- name: Checkout LFS objects
37-
run: git lfs checkout
38-
39-
- uses: actions/setup-go@v5
40-
with:
41-
go-version: 1.22
42-
43-
- name: Create k8s Kind Cluster
44-
run: bash ./scripts/konk-ci/01-kind.sh
45-
46-
- name: Install Serving
47-
run: bash ./scripts/konk-ci/02-serving.sh
32+
- name: Checkout repository
33+
uses: actions/checkout@v4
4834

49-
- name: Install Kourier
50-
run: bash ./scripts/konk-ci/02-kourier.sh
51-
52-
- name: Setup domain and autoscaler
53-
run: |
54-
INGRESS_HOST="127.0.0.1"
55-
KNATIVE_DOMAIN=$INGRESS_HOST.sslip.io
56-
kubectl patch configmap -n knative-serving config-domain -p "{\"data\": {\"$KNATIVE_DOMAIN\": \"\"}}"
57-
kubectl patch configmap -n knative-serving config-autoscaler -p "{\"data\": {\"allow-zero-initial-scale\": \"true\"}}"
58-
kubectl patch configmap -n knative-serving config-features -p "{\"data\": {\"kubernetes.podspec-affinity\": \"enabled\"}}"
59-
kubectl label node knative-control-plane loader-nodetype=worker
35+
- name: Set up Kubernetes KinD Cluster and install Knative
36+
uses: ./.github/actions/ci_knative_setup
6037

6138
- name: Build and run loader
6239
run: go run cmd/loader.go --config pkg/config/test_config.json
@@ -73,6 +50,7 @@ jobs:
7350
do
7451
kubectl logs -n default -c $container_name -l serving.knative.dev/service=${{ matrix.service }}
7552
done
53+
7654
- name: Down
7755
if: ${{ always() }}
7856
run: |
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: End-to-End Multi-Loader Tests
2+
3+
on:
4+
schedule:
5+
- cron: "0 9 * * 1"
6+
workflow_dispatch:
7+
push:
8+
branches: [main]
9+
pull_request:
10+
branches: [main]
11+
12+
env:
13+
GOOS: linux
14+
GO111MODULE: on
15+
16+
jobs:
17+
test-multi-loader:
18+
name: Test Multi-Loader with Knative Deployment
19+
env:
20+
KIND_VERSION: v0.22.0
21+
K8S_VERSION: v1.29
22+
YAML_DIR: workloads/container
23+
runs-on: ubuntu-20.04
24+
strategy:
25+
fail-fast: false
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Set up Kubernetes KinD Cluster and install Knative
31+
uses: ./.github/actions/ci_knative_setup
32+
33+
- name: Setup traces for multi trace test
34+
shell: bash
35+
run: bash ./scripts/setup/setup_multi_test_trace.sh
36+
37+
- name: Build and run multi-loader
38+
run: go run tools/multi_loader/multi_loader.go --multiLoaderConfigPath tools/multi_loader/multi_loader_config.json
39+
40+
- name: Check multi_loader output
41+
run: |
42+
# check if there are 4 output folders: *_example_1_test, *_example_2_test, *_example_3_test & dry_run
43+
folder_count=$(find data/out/multi-test/test-experiment -mindepth 1 -maxdepth 1 -type d | wc -l)
44+
if [ "$folder_count" -ne 4 ]; then
45+
echo "Output folder count is $folder_count, expected 4"
46+
exit 1
47+
else
48+
echo "Output correct number of folders"
49+
fi
50+
51+
# Check for errors in each output CSV file
52+
for file in $(find . -name "*_example_1_test/example_1_test_duration_1.csv" -o -name "*_example_2_test/example_2_test_duration_1.csv" -o -name "*_example_3_test/example_3_test_duration_1.csv"); do
53+
if [ ! -f "$file" ]; then
54+
echo "File $file not found!"
55+
exit 1
56+
fi
57+
58+
if [ $(grep true "$file" | wc -l) -ne 0 ]; then
59+
echo "Error found in $file"
60+
exit 1
61+
fi
62+
done
63+
echo "No errors found in output files"
64+
65+
- name: Down
66+
if: ${{ always() }}
67+
run: |
68+
kn service delete --all

.github/workflows/linters.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-20.04
1212
steps:
1313
- uses: actions/checkout@v4
14-
- uses: rojopolis/spellcheck-github-actions@0.45.0
14+
- uses: rojopolis/spellcheck-github-actions@0.46.0
1515
name: Spellcheck
1616
with:
1717
config_path: .github/configs/spellcheck.yml

.github/workflows/tools-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
fail-fast: false
2424
matrix:
25-
module: [ tools/plotter, ]
25+
module: [ tools/plotter, tools/multi_loader/runner]
2626
steps:
2727
- name: Set up Golang
2828
uses: actions/setup-go@v5

cmd/config_dirigent_dandelion_rps.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"RpsRuntimeMs": 10,
2020
"RpsMemoryMB": 2048,
2121
"RpsIterationMultiplier": 80,
22+
"RpsDataSizeMB": 0.00,
2223

2324
"TracePath": "RPS",
2425
"Granularity": "minute",

cmd/config_dirigent_rps.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"RpsRuntimeMs": 10,
2020
"RpsMemoryMB": 2048,
2121
"RpsIterationMultiplier": 80,
22+
"RpsDataSizeMB": 0.00,
2223

2324
"TracePath": "RPS",
2425
"Granularity": "minute",

cmd/config_knative_rps.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"RpsRuntimeMs": 10,
1616
"RpsMemoryMB": 2048,
1717
"RpsIterationMultiplier": 80,
18+
"RpsDataSizeMB": 0.00,
1819

1920
"TracePath": "RPS",
2021
"Granularity": "minute",

0 commit comments

Comments
 (0)