-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into add-e2e-workflow-purge
- Loading branch information
Showing
130 changed files
with
8,613 additions
and
986 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 |
---|---|---|
|
@@ -26,6 +26,7 @@ const owners = [ | |
'tanvigour', | ||
'yaron2', | ||
'rabollin', | ||
'ashiquemd' | ||
] | ||
|
||
const SDKs = [ | ||
|
File renamed without changes.
25 changes: 25 additions & 0 deletions
25
...lease-1.12/dapr-sidecar-master/0002-Remove-Deprecated-RenameReminder-API-from-tests.patch
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,25 @@ | ||
From 01ae6f45a75608c0322f9ac556b73d53fb3d8983 Mon Sep 17 00:00:00 2001 | ||
From: Shivam Kumar <shivamkm07@gmail.com> | ||
Date: Tue, 19 Dec 2023 06:28:51 +0530 | ||
Subject: Remove Deprecated RenameReminder API from tests | ||
|
||
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> | ||
--- | ||
tests/apps/actorfeatures/app.go | 1 - | ||
1 file changed, 1 deletion(-) | ||
|
||
diff --git a/tests/apps/actorfeatures/app.go b/tests/apps/actorfeatures/app.go | ||
index 9344f204..62e8c935 100644 | ||
--- a/tests/apps/actorfeatures/app.go | ||
+++ b/tests/apps/actorfeatures/app.go | ||
@@ -621,7 +621,6 @@ func nonHostedTestHandler(w http.ResponseWriter, r *http.Request) { | ||
"GetReminder": {"GET", nil}, | ||
"CreateReminder": {"PUT", struct{}{}}, | ||
"DeleteReminder": {"DELETE", struct{}{}}, | ||
- "RenameReminder": {"PATCH", struct{}{}}, | ||
} | ||
for op, t := range tests { | ||
body, err := httpCall(t.Method, url, t.Body, http.StatusForbidden) | ||
-- | ||
2.34.1 | ||
|
140 changes: 140 additions & 0 deletions
140
...ase-1.12/dapr-sidecar-master/0003-Added-patch-for-updated-http_metrics-test-in-1.12.patch
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,140 @@ | ||
From 35be8001be203765d8ed160f614b4309981ae30b Mon Sep 17 00:00:00 2001 | ||
From: Shivam Kumar <shivamkm07@gmail.com> | ||
Date: Tue, 19 Dec 2023 07:15:40 +0530 | ||
Subject: Added patch for updated http_metrics test in 1.12 | ||
|
||
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> | ||
--- | ||
tests/e2e/metrics/metrics_test.go | 58 +++++++++++++++---------------- | ||
1 file changed, 28 insertions(+), 30 deletions(-) | ||
|
||
diff --git a/tests/e2e/metrics/metrics_test.go b/tests/e2e/metrics/metrics_test.go | ||
index 13baf6b5..94b1c2e9 100644 | ||
--- a/tests/e2e/metrics/metrics_test.go | ||
+++ b/tests/e2e/metrics/metrics_test.go | ||
@@ -33,6 +33,7 @@ import ( | ||
"github.com/dapr/dapr/tests/runner" | ||
io_prometheus_client "github.com/prometheus/client_model/go" | ||
"github.com/prometheus/common/expfmt" | ||
+ "github.com/stretchr/testify/assert" | ||
"github.com/stretchr/testify/require" | ||
"google.golang.org/grpc" | ||
"google.golang.org/grpc/credentials/insecure" | ||
@@ -65,10 +66,7 @@ func TestMain(m *testing.M) { | ||
MetricsEnabled: true, | ||
}, | ||
{ | ||
- AppName: "grpcmetrics", | ||
- // TODO: Some AKS clusters created before do not support CRD defaulting even | ||
- // if Kubernetes version is 1.16/1.17 later. | ||
- // Config: "obs-defaultmetric", | ||
+ AppName: "grpcmetrics", | ||
DaprEnabled: true, | ||
ImageName: "e2e-stateapp", | ||
Replicas: 1, | ||
@@ -178,37 +176,30 @@ func invokeDaprHTTP(t *testing.T, app string, n, daprPort int) { | ||
func testHTTPMetrics(t *testing.T, app string, res *http.Response) { | ||
require.NotNil(t, res) | ||
|
||
- foundMetric, foundPath := findHTTPMetricFromPrometheus(t, app, res) | ||
+ foundMetric := findHTTPMetricFromPrometheus(t, app, res) | ||
|
||
// Check metric was found | ||
require.True(t, foundMetric) | ||
- // Check metric with method was found | ||
- require.True(t, foundPath) | ||
} | ||
|
||
func testMetricDisabled(t *testing.T, app string, res *http.Response) { | ||
require.NotNil(t, res) | ||
|
||
- foundMetric, foundPath := findHTTPMetricFromPrometheus(t, app, res) | ||
+ foundMetric := findHTTPMetricFromPrometheus(t, app, res) | ||
|
||
// Check metric was found | ||
require.False(t, foundMetric) | ||
- // Check metric with method was found | ||
- require.False(t, foundPath) | ||
} | ||
|
||
-func findHTTPMetricFromPrometheus(t *testing.T, app string, res *http.Response) (bool, bool) { | ||
+func findHTTPMetricFromPrometheus(t *testing.T, app string, res *http.Response) (foundMetric bool) { | ||
rfmt := expfmt.ResponseFormat(res.Header) | ||
require.NotEqual(t, rfmt, expfmt.FmtUnknown) | ||
|
||
decoder := expfmt.NewDecoder(res.Body, rfmt) | ||
|
||
// This test will loop through each of the metrics and look for a specifc | ||
- // metric `dapr_http_server_request_count`. Once it finds the metric | ||
- // it will check the `path` label is as expected for the invoked action. | ||
- var foundMetric bool | ||
- var foundPath bool | ||
- | ||
+ // metric `dapr_http_server_request_count`. | ||
+ var foundHealthz, foundInvocation bool | ||
for { | ||
mf := &io_prometheus_client.MetricFamily{} | ||
err := decoder.Decode(mf) | ||
@@ -217,38 +208,45 @@ func findHTTPMetricFromPrometheus(t *testing.T, app string, res *http.Response) | ||
} | ||
require.NoError(t, err) | ||
|
||
- if strings.EqualFold(mf.GetName(), "dapr_http_server_request_count") { | ||
+ if strings.ToLower(mf.GetName()) == "dapr_http_server_request_count" { | ||
foundMetric = true | ||
+ | ||
for _, m := range mf.GetMetric() { | ||
if m == nil { | ||
continue | ||
} | ||
+ count := m.GetCounter() | ||
+ | ||
// check metrics with expected method exists | ||
for _, l := range m.GetLabel() { | ||
if l == nil { | ||
continue | ||
} | ||
- if strings.EqualFold(l.GetName(), "path") { | ||
- foundPath = true | ||
- | ||
- if strings.Contains(l.GetValue(), "healthz") { | ||
- if strings.Contains(l.GetValue(), "outbound") { | ||
- require.Equal(t, "/v1.0/healthz/outbound", l.GetValue()) | ||
- } else { | ||
- require.Equal(t, "/v1.0/healthz", l.GetValue()) | ||
+ val := l.GetValue() | ||
+ switch strings.ToLower(l.GetName()) { | ||
+ case "app_id": | ||
+ assert.Equal(t, "httpmetrics", val) | ||
+ case "method": | ||
+ if count.GetValue() > 0 { | ||
+ switch val { | ||
+ case "Healthz": | ||
+ foundHealthz = true | ||
+ case "InvokeService/httpmetrics": | ||
+ foundInvocation = true | ||
} | ||
- } else { | ||
- require.Equal(t, fmt.Sprintf("/v1.0/invoke/%s/method/tests/green", app), l.GetValue()) | ||
} | ||
- | ||
- break | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
- return foundMetric, foundPath | ||
+ if foundMetric { | ||
+ require.True(t, foundHealthz) | ||
+ require.True(t, foundInvocation) | ||
+ } | ||
+ | ||
+ return foundMetric | ||
} | ||
|
||
func invokeDaprGRPC(t *testing.T, app string, n, daprPort int) { | ||
-- | ||
2.34.1 | ||
|
32 changes: 32 additions & 0 deletions
32
...-patches/release-1.12/dapr-sidecar-master/0004-Setting-IngressPort-in-workflow-test.patch
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,32 @@ | ||
From a662f110afba13ce24b51e83eaa9f4bf43b9aadf Mon Sep 17 00:00:00 2001 | ||
From: Shivam Kumar <shivamkm07@gmail.com> | ||
Date: Fri, 22 Dec 2023 19:20:51 +0530 | ||
Subject: Setting IngressPort in workflow test | ||
|
||
Signed-off-by: Shivam Kumar <shivamkm07@gmail.com> | ||
--- | ||
tests/e2e/workflows/workflow_test.go | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/tests/e2e/workflows/workflow_test.go b/tests/e2e/workflows/workflow_test.go | ||
index 307c5456..00ed176d 100644 | ||
--- a/tests/e2e/workflows/workflow_test.go | ||
+++ b/tests/e2e/workflows/workflow_test.go | ||
@@ -52,12 +52,12 @@ func TestMain(m *testing.M) { | ||
ImageName: "e2e-workflowsapp", | ||
Replicas: 1, | ||
IngressEnabled: true, | ||
- MetricsEnabled: true, | ||
+ IngressPort: 3000, | ||
DaprMemoryLimit: "200Mi", | ||
DaprMemoryRequest: "100Mi", | ||
AppMemoryLimit: "200Mi", | ||
AppMemoryRequest: "100Mi", | ||
- AppPort: 3000, | ||
+ AppPort: -1, | ||
DebugLoggingEnabled: true, | ||
}, | ||
} | ||
-- | ||
2.34.1 | ||
|
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
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
Oops, something went wrong.