Skip to content

Commit 02a31eb

Browse files
committed
Merge branch 'main' into bound-concurrency-for-k8s-snapshotting
2 parents 5736db9 + fda38e9 commit 02a31eb

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

cmd/kosli/multiHost.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@ Kosli uses CI pipelines in the cyber-dojo Org repos [*] for two purposes:
55
1. public facing documentation
66
2. private development purposes
77
8-
All Kosli CLI calls in [*] are made to _two_ servers (because of 2)
8+
All Kosli CLI calls in [*] are made to _three_ servers (because of 2)
99
- https://app.kosli.com
1010
- https://staging.app.kosli.com
11+
- https://app.us.kosli.com
1112
12-
Explicitly making each Kosli CLI call in [*] twice is not an option (because of 1)
13-
Duplicating the entire CI workflows is complex because, eg, deployments must not be duplicated.
14-
The least-worst option is to allow KOSLI_HOST and KOSLI_API_TOKEN to specify two
13+
Explicitly making each Kosli CLI call in [*] three times is not an option (because of 1)
14+
Duplicating the entire CI workflows is complex, eg, deployments must not be duplicated.
15+
The least-worst option is to allow KOSLI_HOST and KOSLI_API_TOKEN to specify multiple
1516
comma-separated values. Note cyber-dojo must ensure its api-tokens do not contain commas.
1617
*/
1718

@@ -52,7 +53,7 @@ func runMultiHost(args []string) (string, error) {
5253
args0 := argsAppendHostApiTokenFlags(0)
5354
output0, err0 := runBufferedInnerMain(args0)
5455

55-
stdOut := output0
56+
stdOut := fmt.Sprintf("[%s]\n", opts.hosts[0]) + output0
5657
var errorMessage string
5758

5859
if err0 != nil {

cmd/kosli/multiHost_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (suite *MultiHostTestSuite) TestRunDoubledHost() {
118118
{
119119
name: "only returns primary call output when both (2) calls succeed",
120120
args: doubledArgs([]string{"kosli", "status"}),
121-
stdOut: []string{"OK", ""},
121+
stdOut: []string{"[http://localhost:8001]", "OK", ""},
122122
err: error(nil),
123123
},
124124
} {
@@ -153,7 +153,7 @@ func (suite *MultiHostTestSuite) TestRunTripledHost() {
153153
{
154154
name: "only returns primary call output when all three calls succeed",
155155
args: tripledArgs([]string{"kosli", "status"}),
156-
stdOut: []string{"OK", ""},
156+
stdOut: []string{"[http://localhost:8001]", "OK", ""},
157157
err: error(nil),
158158
},
159159
} {

cmd/kosli/testdata/sonar/sonarcloud/.scannerwork/report-task.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ projectKey=cyber-dojo_differ
33
serverUrl=https://sonarcloud.io
44
serverVersion=8.0.0.56246
55
dashboardUrl=https://sonarcloud.io/dashboard?id=cyber-dojo_differ
6-
ceTaskId=AZgJEAI2n7oVZixyFGDG
7-
ceTaskUrl=https://sonarcloud.io/api/ce/task?id=AZgJEAI2n7oVZixyFGDG
6+
ceTaskId=AZrs5eywBfkZKeU0sde9
7+
ceTaskUrl=https://sonarcloud.io/api/ce/task?id=AZrs5eywBfkZKeU0sde9

0 commit comments

Comments
 (0)