Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP and gRPC Grafana and removal of extraneous parts #1565

Merged
merged 121 commits into from
Aug 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
9d3553b
HTTP Grafana dashboard
Alan-Cha Jul 21, 2023
a007cb9
Clean up
Alan-Cha Jul 24, 2023
0fa6ddc
Add grafana option to HTTP task
Alan-Cha Jul 24, 2023
c6f30b4
Fix some tests
Alan-Cha Jul 24, 2023
d07a5d9
More clean up
Alan-Cha Jul 24, 2023
2c416bf
Fix import
Alan-Cha Jul 25, 2023
25c4a07
Improve custom metrics tests
Alan-Cha Jul 26, 2023
6997204
Fix http task
Alan-Cha Jul 26, 2023
e2f0081
Add test for HTTP Grafana dashboard
Alan-Cha Jul 26, 2023
5a426d8
Additional tests
Alan-Cha Jul 26, 2023
e6cc63d
Fix test
Alan-Cha Jul 26, 2023
5a37c49
Address Michael's comments
Alan-Cha Jul 28, 2023
e27a4f9
gRPC Grafana dashboard
Alan-Cha Jul 27, 2023
2e955f5
Rename functions
Alan-Cha Jul 28, 2023
c22d8ba
Address Michael's comments
Alan-Cha Jul 28, 2023
121940a
Rename to getGRPCDashboard
Alan-Cha Jul 28, 2023
7a81e0d
Delete assess, report, SLOs, rewards
Alan-Cha Jul 28, 2023
b17de2e
Remove assess, report, autox, and reports
Alan-Cha Jul 31, 2023
8cdcaa9
Fix workflows
Alan-Cha Jul 31, 2023
377f1c9
Modify error message
Alan-Cha Aug 1, 2023
4437a45
Remove cronjob
Alan-Cha Aug 1, 2023
3d07dc7
Revert ready taskin workflows
Alan-Cha Aug 1, 2023
e46eecf
Remove looped experiments in workflows
Alan-Cha Aug 1, 2023
4638a48
Remove grafana flag
Alan-Cha Aug 1, 2023
22af960
Remove extraneous consts and func
Alan-Cha Aug 1, 2023
ecd0841
Add assert
Alan-Cha Aug 1, 2023
cc8ac2d
Fix test
Alan-Cha Aug 1, 2023
771e3e0
Remove custommetrics
Alan-Cha Aug 1, 2023
8b65f59
Remove testdata for autoX and custommetrics
Alan-Cha Aug 1, 2023
b367230
Gut insights
Alan-Cha Aug 1, 2023
f9e83fc
Fix http tests
Alan-Cha Aug 2, 2023
51e2f4c
Fix gRPC tests
Alan-Cha Aug 2, 2023
eb8a42b
Fix experiment tests
Alan-Cha Aug 2, 2023
ca6eeb8
Fix server tests
Alan-Cha Aug 2, 2023
4bbf904
Fix file driver tests
Alan-Cha Aug 2, 2023
ca744aa
Fix server tests
Alan-Cha Aug 2, 2023
6899809
Fix assert tests
Alan-Cha Aug 2, 2023
b6e44d4
Fix kubedriver tests
Alan-Cha Aug 2, 2023
e595d17
Fix tests
Alan-Cha Aug 3, 2023
d2e2cb2
Refactor MockMetricsServer as test helper
Alan-Cha Aug 3, 2023
159fffe
Remove metrics and extraneous
Alan-Cha Aug 3, 2023
670b165
Remove extraneous code
Alan-Cha Aug 3, 2023
f789e8e
Add comments to mock server functions/types
Alan-Cha Aug 3, 2023
b0e3e97
Remove extraneous
Alan-Cha Aug 3, 2023
dafa7ee
Remove extraneous
Alan-Cha Aug 3, 2023
95f2159
Add routemap tests
Alan-Cha Aug 3, 2023
26f281b
Remove SLOs
Alan-Cha Aug 3, 2023
df81e86
Remove error message
Alan-Cha Aug 3, 2023
24af8c8
Add UnmarshalJSON() test
Alan-Cha Aug 3, 2023
31802a9
Remove rewards
Alan-Cha Aug 3, 2023
ed59992
Add better multiple endpoint support to HTTP
Alan-Cha Aug 4, 2023
f75239a
Better gRPC multiple endpoint support
Alan-Cha Aug 4, 2023
a13f950
Add single endpoint multiple call test for gRPC
Alan-Cha Aug 4, 2023
8b0c4eb
Remove runner option
Alan-Cha Aug 4, 2023
6ec45aa
Fix worfkflow
Alan-Cha Aug 4, 2023
8d3bc5f
Remove if parameter from github and slack tasks
Alan-Cha Aug 8, 2023
c64f202
Remove custommetrics template
Alan-Cha Aug 8, 2023
b508a9e
Add name and namespace to experiment result
Alan-Cha Aug 8, 2023
8dda62d
Add space
Alan-Cha Aug 8, 2023
4f8b7ec
Remove reuseResult
Alan-Cha Aug 12, 2023
8a2738f
Performance result has result instead of insights
Alan-Cha Aug 12, 2023
3276a29
Remove NumLoops
Alan-Cha Aug 12, 2023
3a1b9a0
Add dashboardSummary type
Alan-Cha Aug 13, 2023
d125727
Bump version
Alan-Cha Aug 14, 2023
58165dc
Add get experiment result methods
Alan-Cha Aug 14, 2023
e17782e
Temp
Alan-Cha Aug 16, 2023
23113fe
Cannot cast interface into HTTPResult
Alan-Cha Aug 18, 2023
5733251
Only write experimentResult to metrics store
Alan-Cha Aug 20, 2023
a4c30e2
Remove assert command
Alan-Cha Aug 20, 2023
7237046
Uncomment test
Alan-Cha Aug 20, 2023
603d44c
Remove assert
Alan-Cha Aug 20, 2023
cc6557b
Remove original Write() implmentation
Alan-Cha Aug 21, 2023
2859534
Update tests
Alan-Cha Aug 21, 2023
6bff9e2
Fix tests
Alan-Cha Aug 21, 2023
8d26440
Rename traffic controller to controller
Alan-Cha Aug 21, 2023
38b842b
Fix test
Alan-Cha Aug 21, 2023
92265f8
Rename kustomize/iter8 to kustomize/controller
Alan-Cha Aug 21, 2023
f5d0e1b
Update Grafana dashboard to use ExperimentResult
Alan-Cha Aug 21, 2023
7875f08
Comment other workflows
Alan-Cha Aug 22, 2023
34e83d8
Comment testperformance workflow
Alan-Cha Aug 22, 2023
105264c
Add test
Alan-Cha Aug 22, 2023
c34c709
Print env
Alan-Cha Aug 23, 2023
9a9399f
Move test into assets
Alan-Cha Aug 23, 2023
fe4b549
Add load test
Alan-Cha Aug 23, 2023
ab196dd
Fix test
Alan-Cha Aug 23, 2023
b7ce2bb
Add version and tag
Alan-Cha Aug 23, 2023
1f9d976
Move echo to beginning
Alan-Cha Aug 23, 2023
df55dcb
Delete assets test
Alan-Cha Aug 23, 2023
21f9e4b
Tweeking
Alan-Cha Aug 23, 2023
c798f23
Add output
Alan-Cha Aug 23, 2023
11bdaae
Directly use outputs
Alan-Cha Aug 23, 2023
483d6a1
Fix link using quotes
Alan-Cha Aug 23, 2023
10d8c06
Add more logging
Alan-Cha Aug 23, 2023
91f9fd7
Fix logging
Alan-Cha Aug 23, 2023
6a5f4e9
Job working but needed more logging
Alan-Cha Aug 23, 2023
afaffed
Add wait
Alan-Cha Aug 23, 2023
26ba3d7
Clean up
Alan-Cha Aug 23, 2023
9a23f1d
Add Docker login
Alan-Cha Aug 23, 2023
a89d619
Clean up
Alan-Cha Aug 23, 2023
8493704
Correct image repo name
Alan-Cha Aug 23, 2023
bb0ca0e
Add everything
Alan-Cha Aug 23, 2023
ad38fd7
Adjust comments
Alan-Cha Aug 24, 2023
8adbc7b
Uncomment
Alan-Cha Aug 24, 2023
ada749f
Add controller and check to testcharts.yaml
Alan-Cha Aug 24, 2023
8cf0ca5
Uncomment testkustomize.yaml
Alan-Cha Aug 24, 2023
6413d39
Uncomment testcharts.yaml
Alan-Cha Aug 24, 2023
fa69836
Add build-push-test-image to testperformance.yaml
Alan-Cha Aug 24, 2023
b9d4fd6
Uncomment assets.yaml
Alan-Cha Aug 24, 2023
f9349ad
Add controller to assets
Alan-Cha Aug 24, 2023
c19085f
Uncomment again
Alan-Cha Aug 24, 2023
8218348
Temp changes
Alan-Cha Aug 24, 2023
aad6f4e
Respond to Sri's comments about workflows
Alan-Cha Aug 24, 2023
a837fcb
Revert chart and kustomize changes
Alan-Cha Aug 24, 2023
7b7aee0
Fix paths
Alan-Cha Aug 24, 2023
98dbfd2
Revert version to v0.15
Alan-Cha Aug 24, 2023
d7a3b71
Fix test
Alan-Cha Aug 24, 2023
ba2939a
Remove extraneous logging
Alan-Cha Aug 24, 2023
e390816
Remove extaneous logging
Alan-Cha Aug 24, 2023
4ed26ac
Update README.md
Alan-Cha Aug 24, 2023
e64e606
Update wordlist
Alan-Cha Aug 24, 2023
0939ce6
Change name
Alan-Cha Aug 24, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,5 @@ Shubham
Sood
Toolchains
jetic
Öztürk
Öztürk
reconfigures
152 changes: 152 additions & 0 deletions .github/workflows/assets/grpcurl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: sleep
spec:
replicas: 1
selector:
matchLabels:
app: sleep
template:
metadata:
labels:
app: sleep
spec:
containers:
- name: sleep
image: fullstorydev/grpcurl:latest-alpine
command: ["/bin/sh", "-c", "source command.sh"]
workingDir: /demo
imagePullPolicy: IfNotPresent
volumeMounts:
- name: config-volume
mountPath: /demo
volumes:
- name: config-volume
configMap:
name: demo-input
---
apiVersion: v1
kind: ConfigMap
metadata:
name: demo-input
data:
route_guide.proto: |
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

option go_package = "google.golang.org/grpc/examples/route_guide/routeguide";
option java_multiple_files = true;
option java_package = "io.grpc.examples.routeguide";
option java_outer_classname = "RouteGuideProto";

package routeguide;

// Interface exported by the server.
service RouteGuide {
// A simple RPC.
//
// Obtains the feature at a given position.
//
// A feature with an empty name is returned if there's no feature at the given
// position.
rpc GetFeature(Point) returns (Feature) {}

// A server-to-client streaming RPC.
//
// Obtains the Features available within the given Rectangle. Results are
// streamed rather than returned at once (e.g. in a response message with a
// repeated field), as the rectangle may cover a large area and contain a
// huge number of features.
rpc ListFeatures(Rectangle) returns (stream Feature) {}

// A client-to-server streaming RPC.
//
// Accepts a stream of Points on a route being traversed, returning a
// RouteSummary when traversal is completed.
rpc RecordRoute(stream Point) returns (RouteSummary) {}

// A Bidirectional streaming RPC.
//
// Accepts a stream of RouteNotes sent while a route is being traversed,
// while receiving other RouteNotes (e.g. from other users).
rpc RouteChat(stream RouteNote) returns (stream RouteNote) {}
}

// Points are represented as latitude-longitude pairs in the E7 representation
// (degrees multiplied by 10**7 and rounded to the nearest integer).
// Latitudes should be in the range +/- 90 degrees and longitude should be in
// the range +/- 180 degrees (inclusive).
message Point {
int32 latitude = 1;
int32 longitude = 2;
}

// A latitude-longitude rectangle, represented as two diagonally opposite
// points "lo" and "hi".
message Rectangle {
// One corner of the rectangle.
Point lo = 1;

// The other corner of the rectangle.
Point hi = 2;
}

// A feature names something at a given point.
//
// If a feature could not be named, the name is empty.
message Feature {
// The name of the feature.
string name = 1;

// The point where the feature is detected.
Point location = 2;
}

// A RouteNote is a message sent while at a given point.
message RouteNote {
// The location from which the message is sent.
Point location = 1;

// The message to be sent.
string message = 2;
}

// A RouteSummary is received in response to a RecordRoute rpc.
//
// It contains the number of individual points received, the number of
// detected features, and the total distance covered as the cumulative sum of
// the distance between each point.
message RouteSummary {
// The number of points received.
int32 point_count = 1;

// The number of known features passed while traversing the route.
int32 feature_count = 2;

// The distance covered in metres.
int32 distance = 3;

// The duration of the traversal in seconds.
int32 elapsed_time = 4;
}
unary.json: |
{
"latitude": 407838351,
"longitude": -746143763
}
command.sh: |
cat unary.json | grpcurl -plaintext -proto route_guide.proto -d @ routeguide:50051 routeguide.RouteGuide.GetFeature
3 changes: 2 additions & 1 deletion .github/workflows/draftrelease.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Release drafter

# Runs when changes are pushed

on:
push:
# branches to consider in the event; optional, defaults to all
branches:
- master

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
name: golangci-lint

# Only runs when there are golang code changes

# Lint golang files

on:
pull_request:
branches:
- master
paths:
- '**.go'

permissions:
contents: read
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/linkcheck.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: Link checker

# Only runs when there are markdown changes and intermittently

# Check links across markdown files

on:
pull_request:
branches:
- master
paths:
- '**.md'
schedule:
- cron: "0 0 1 * *"

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/lintcharts.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
name: Lint Helm charts

# Only runs when charts have changed

# Lint Helm charts

on:
pull_request:
branches:
- master
paths:
- charts/**

jobs:
# Get the paths for the Helm charts to lint
Expand Down
88 changes: 9 additions & 79 deletions .github/workflows/lintcharts2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,54 +4,23 @@ name: Additional Helm chart linting
# This workflow builds on the other workflow by producing Kubernetes YAML files from the templates and running kube-linter on those files
# See iter8-tools/iter8#1452

# Only runs when charts have changed

# Lint Helm charts
# Use templates to create Kubernetes YAML files and lint them

on:
pull_request:
branches:
- master
paths:
- charts/**

jobs:
http-experiment:
name: Lint HTTP experiment
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Get modified files in the charts/iter8 folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/iter8

- uses: azure/setup-helm@v3
if: steps.modified-files.outputs.any_modified == 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Create Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm template charts/iter8 \
--set "tasks={ready,http,assess}" \
--set ready.deploy=httpbin \
--set ready.service=httpbin \
--set ready.timeout=60s \
--set http.url=http://httpbin.default/get \
--set assess.SLOs.upper.http/latency-mean=50 \
--set assess.SLOs.upper.http/error-count=0 \
--set runner=job >> iter8.yaml

- name: Lint Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
uses: stackrox/kube-linter-action@v1
with:
directory: iter8.yaml

http-looped-experiment:
name: Lint HTTP looped experiment
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
Expand All @@ -72,9 +41,7 @@ jobs:
run: |
helm template charts/iter8 \
--set tasks={http} \
--set http.url="http://httpbin.default/get" \
--set runner=cronjob \
--set cronjobSchedule="*/1 * * * *" >> iter8.yaml
--set http.url=http://httpbin.default/get >> iter8.yaml

- name: Lint Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
Expand Down Expand Up @@ -108,47 +75,10 @@ jobs:
--set tasks={grpc} \
--set grpc.host="hello.default:50051" \
--set grpc.call="helloworld.Greeter.SayHello" \
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set runner=job >> iter8.yaml
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" >> iter8.yaml

- name: Lint Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
uses: stackrox/kube-linter-action@v1
with:
directory: iter8.yaml

grpc-looped-experiment:
name: Lint gRPC looped experiment
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3

- name: Get modified files in the charts/iter8 folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/iter8

- uses: azure/setup-helm@v3
if: steps.modified-files.outputs.any_modified == 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Create Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm template charts/iter8 \
--set tasks={grpc} \
--set grpc.host="hello.default:50051" \
--set grpc.call="helloworld.Greeter.SayHello" \
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set runner=cronjob \
--set cronjobSchedule="*/1 * * * *" >> iter8.yaml

- name: Lint Kubernetes YAML file
if: steps.modified-files.outputs.any_modified == 'true'
uses: stackrox/kube-linter-action@v1
with:
directory: iter8.yaml
Loading
Loading