Skip to content

Commit b388f85

Browse files
authored
instancehealth: permissionSyncJobs -> permissionsSyncJobs (#1010)
* instancehealth: permissionSyncJobs -> permissionsSyncJobs * fixup
1 parent c0e74d1 commit b388f85

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ All notable changes to `src-cli` are documented in this file.
1717

1818
### Fixed
1919

20+
- Fixed `src snapshot validate`. [#1010](https://github.com/sourcegraph/src-cli/pull/1010)
2021
- Fixed `src code-intel upload` not respecting `-insecure-skip-verify`. [#1012](https://github.com/sourcegraph/src-cli/pull/1012)
2122

2223
### Removed

internal/instancehealth/checks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func checkPermissionsSyncing(
134134
var syncCount int
135135
var syncErrors []string
136136
var seenProviders = make(map[string]map[string]string) // provider : state : message
137-
for _, sync := range instanceHealth.PermissionSyncJobs.Nodes {
137+
for _, sync := range instanceHealth.PermissionsSyncJobs.Nodes {
138138
if sync.FinishedAt.Before(time.Now().Add(-since)) {
139139
continue
140140
}

internal/instancehealth/checks_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestCheckPermissionsSyncing(t *testing.T) {
2424
}{{
2525
name: "no jobs",
2626
instanceHealth: Indicators{
27-
PermissionSyncJobs: struct{ Nodes []permissionSyncJob }{
27+
PermissionsSyncJobs: struct{ Nodes []permissionSyncJob }{
2828
Nodes: nil,
2929
},
3030
},
@@ -33,7 +33,7 @@ func TestCheckPermissionsSyncing(t *testing.T) {
3333
}, {
3434
name: "healthy",
3535
instanceHealth: Indicators{
36-
PermissionSyncJobs: struct{ Nodes []permissionSyncJob }{
36+
PermissionsSyncJobs: struct{ Nodes []permissionSyncJob }{
3737
Nodes: []permissionSyncJob{{
3838
FinishedAt: time.Now(),
3939
State: "SUCCESS",
@@ -50,7 +50,7 @@ func TestCheckPermissionsSyncing(t *testing.T) {
5050
}, {
5151
name: "unhealthy",
5252
instanceHealth: Indicators{
53-
PermissionSyncJobs: struct{ Nodes []permissionSyncJob }{
53+
PermissionsSyncJobs: struct{ Nodes []permissionSyncJob }{
5454
Nodes: []permissionSyncJob{{
5555
FinishedAt: time.Now(),
5656
State: "ERROR",

internal/instancehealth/summary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type Indicators struct {
4040
}
4141
}
4242
}
43-
PermissionSyncJobs struct {
43+
PermissionsSyncJobs struct {
4444
Nodes []permissionSyncJob
4545
}
4646
}
@@ -95,7 +95,7 @@ func GetIndicators(ctx context.Context, client api.Client) (*Indicators, error)
9595
}
9696
}
9797
98-
permissionSyncJobs(first:500) {
98+
permissionsSyncJobs(first:500) {
9999
nodes {
100100
state
101101
finishedAt

0 commit comments

Comments
 (0)