Skip to content

Commit 54383be

Browse files
committed
Project flag must be mandatory
1 parent 861efe6 commit 54383be

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.evergreen/perfcomp/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
To install the latest version:
88

99
```bash
10-
go install github.com/mongodb-labs/drivers-evergreen-tools/perfcomp
10+
go install github.com/mongodb-labs/drivers-evergreen-tools/perfcomp/cmd/perfcomp@latest
1111
```
1212

1313
Or build it locally in `bin/perfcomp`:
@@ -43,7 +43,7 @@ Usage:
4343
perfcomp compare [version_id] [flags]
4444

4545
Flags:
46-
--project string specify the name of an existing Evergreen project (default "mongo-go-driver")
46+
--project string specify the name of an existing Evergreen project (required)
4747
```
4848

4949
#### mdreport
@@ -59,7 +59,7 @@ Usage:
5959
Alternatively, you can run the perfcomp shell script. This script will run build and then run `compare`. From the root directory,
6060

6161
```bash
62-
PERF_URI_PRIVATE_ENDPOINT="<perf_uri>" VERSION_ID="<version>" .evergreen/run-perf-comp.sh
62+
PERF_URI_PRIVATE_ENDPOINT="<perf_uri>" VERSION_ID="<version>" PROJECT="<project>" .evergreen/run-perf-comp.sh
6363
```
6464

6565
If you would like to see a markdown preview of the report, you can also pass in `HEAD_SHA=""`. This will generate `.evergreen/perfcomp/perf-report.md`.

.evergreen/perfcomp/cmd/perfcomp/compare.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ func newCompareCommand() *cobra.Command {
3333
},
3434
}
3535

36-
cmd.Flags().String("project", "mongo-go-driver", "specify the name of an existing Evergreen project")
36+
cmd.Flags().String("project", "", "specify the name of an existing Evergreen project")
37+
cmd.MarkFlagRequired("project")
3738

3839
cmd.Run = func(cmd *cobra.Command, args []string) {
3940
// Check for variables

.evergreen/run-perf-comp.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,9 @@ fi
6060

6161
: "${PERF_URI_PRIVATE_ENDPOINT:?Error: PERF_URI_PRIVATE_ENDPOINT must be set}"
6262
: "${VERSION_ID:?Error: VERSION_ID must be set}"
63+
: "${PROJECT:?Error: PROJECT must be set}"
6364

64-
./bin/perfcomp compare ${VERSION_ID}
65+
./bin/perfcomp compare --project ${PROJECT} ${VERSION_ID}
6566

6667
if [[ -n "${HEAD_SHA+set}" ]]; then
6768
./bin/perfcomp mdreport

0 commit comments

Comments
 (0)