Skip to content

Commit 699c1f9

Browse files
authored
[CI] Fix description written for failed tests in Serverless (#14876)
Fix the description written in the issues created by the daily CI builds in case of Serverless builds.
1 parent 11a2715 commit 699c1f9

File tree

3 files changed

+32
-9
lines changed

3 files changed

+32
-9
lines changed

.buildkite/scripts/common.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -978,8 +978,8 @@ upload_safe_logs() {
978978
local source="$2"
979979
local target="$3"
980980

981-
if ! ls ${source} 2>&1 > /dev/null ; then
982-
echo "upload_safe_logs: artifacts files not found, nothing will be archived"
981+
if ! ls ${source} > /dev/null 2>&1; then
982+
echo "upload_safe_logs: artifacts files not found at ${source}, nothing will be archived"
983983
return
984984
fi
985985

dev/testsreporter/_static/summary.tmpl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1+
{{ if .serverless -}}
2+
- Serverless: {{ .serverlessProject}}
3+
{{ else -}}
14
{{ if ne .stackVersion "" -}}
25
- Stack version: {{ .stackVersion }}
36
{{ else -}}
47
{{ if .logsDB -}}
58
- Stack version: maximum of either the version used in PR builds or 8.17.0 (GA version for LogsDB index mode)
6-
{{ else -}}
9+
{{ else if eq .subscription "basic" -}}
710
- Stack version: Same as in Pull Request builds
811
{{ end -}}
912
{{ end -}}
10-
{{ if .serverless -}}
11-
- Serverless: {{ .serverlessProject}}
1213
{{ end -}}
1314
{{ if .logsDB -}}
1415
- LogsDB: enabled

dev/testsreporter/format_test.go

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,7 @@ func TestSummary(t *testing.T) {
9191
},
9292
teams: []string{"team1", "team2"},
9393
},
94-
expected: `- Stack version: Same as in Pull Request builds
95-
- Serverless: observability
94+
expected: `- Serverless: observability
9695
- Package: foo
9796
- Failing test: mytest
9897
- DataStream: data
@@ -114,8 +113,7 @@ func TestSummary(t *testing.T) {
114113
},
115114
teams: []string{"team1", "team2"},
116115
},
117-
expected: `- Stack version: Same as in Pull Request builds
118-
- Serverless: observability
116+
expected: `- Serverless: observability
119117
- Package: foo
120118
- Failing test: mytest
121119
- Owners:
@@ -183,6 +181,30 @@ func TestSummary(t *testing.T) {
183181
},
184182
expected: `- Stack version: 8.16
185183
- Subscription: basic
184+
- Packages:
185+
- foo
186+
- bar
187+
- Owners:
188+
- team1
189+
`,
190+
},
191+
{
192+
title: "summary with basic license and logsdb",
193+
resultError: &buildError{
194+
dataError: dataError{
195+
logsDB: true,
196+
serverless: false,
197+
subscription: "basic",
198+
},
199+
packages: []string{
200+
"foo",
201+
"bar",
202+
},
203+
teams: []string{"team1"},
204+
},
205+
expected: `- Stack version: maximum of either the version used in PR builds or 8.17.0 (GA version for LogsDB index mode)
206+
- LogsDB: enabled
207+
- Subscription: basic
186208
- Packages:
187209
- foo
188210
- bar

0 commit comments

Comments
 (0)