Skip to content

Commit fe00621

Browse files
authored
Prevent compliance runs from getting stuck with 0 desired results (stackrox/rox#3790)
1 parent 093f24f commit fe00621

File tree

24 files changed

+62
-43
lines changed

24 files changed

+62
-43
lines changed

central/auth/service/service_impl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package service
22

33
import (
4+
"context"
5+
46
"github.com/gogo/protobuf/types"
57
"github.com/grpc-ecosystem/grpc-gateway/runtime"
68
v1 "github.com/stackrox/rox/generated/api/v1"
79
"github.com/stackrox/rox/pkg/grpc/authn"
810
"github.com/stackrox/rox/pkg/grpc/authz/allow"
9-
"golang.org/x/net/context"
1011
"google.golang.org/grpc"
1112
"google.golang.org/grpc/codes"
1213
"google.golang.org/grpc/status"

central/authprovider/service/service_impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package service
22

33
import (
4+
"context"
45
"fmt"
56
"sort"
67

@@ -15,7 +16,6 @@ import (
1516
"github.com/stackrox/rox/pkg/grpc/authz/allow"
1617
"github.com/stackrox/rox/pkg/grpc/authz/perrpc"
1718
"github.com/stackrox/rox/pkg/grpc/authz/user"
18-
"golang.org/x/net/context"
1919
"google.golang.org/grpc"
2020
"google.golang.org/grpc/codes"
2121
"google.golang.org/grpc/status"

central/cluster/service/service_impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package service
22

33
import (
4+
"context"
45
"fmt"
56
"io/ioutil"
67
"strings"
@@ -20,7 +21,6 @@ import (
2021
"github.com/stackrox/rox/pkg/grpc/authz/perrpc"
2122
"github.com/stackrox/rox/pkg/grpc/authz/user"
2223
"github.com/stackrox/rox/pkg/search"
23-
"golang.org/x/net/context"
2424
"google.golang.org/grpc"
2525
"google.golang.org/grpc/codes"
2626
"google.golang.org/grpc/status"

central/compliance/service/service_impl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package service
22

33
import (
4+
"context"
5+
46
"github.com/grpc-ecosystem/grpc-gateway/runtime"
57
"github.com/stackrox/rox/central/cluster/datastore"
68
"github.com/stackrox/rox/central/compliance/aggregation"
@@ -14,7 +16,6 @@ import (
1416
"github.com/stackrox/rox/pkg/grpc/authz/perrpc"
1517
"github.com/stackrox/rox/pkg/grpc/authz/user"
1618
"github.com/stackrox/rox/pkg/search"
17-
"golang.org/x/net/context"
1819
"google.golang.org/grpc"
1920
"google.golang.org/grpc/codes"
2021
"google.golang.org/grpc/status"

central/externalbackups/service/service_impl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package service
22

33
import (
4+
"context"
5+
46
"github.com/grpc-ecosystem/grpc-gateway/runtime"
57
"github.com/stackrox/rox/central/externalbackups/datastore"
68
"github.com/stackrox/rox/central/externalbackups/manager"
@@ -15,7 +17,6 @@ import (
1517
"github.com/stackrox/rox/pkg/protoconv/schedule"
1618
"github.com/stackrox/rox/pkg/secrets"
1719
"github.com/stackrox/rox/pkg/uuid"
18-
"golang.org/x/net/context"
1920
"google.golang.org/grpc"
2021
"google.golang.org/grpc/codes"
2122
"google.golang.org/grpc/status"

central/imageintegration/service/service_impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package service
22

33
import (
4+
"context"
45
"fmt"
56
"sort"
67

@@ -22,7 +23,6 @@ import (
2223
"github.com/stackrox/rox/pkg/registries"
2324
"github.com/stackrox/rox/pkg/scanners"
2425
"github.com/stackrox/rox/pkg/secrets"
25-
"golang.org/x/net/context"
2626
"google.golang.org/grpc"
2727
"google.golang.org/grpc/codes"
2828
"google.golang.org/grpc/status"

central/metadata/service/service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package service
22

33
import (
4+
"context"
5+
46
"github.com/stackrox/rox/central/license/manager"
57
v1 "github.com/stackrox/rox/generated/api/v1"
68
"github.com/stackrox/rox/pkg/concurrency"
79
"github.com/stackrox/rox/pkg/grpc"
810
"github.com/stackrox/rox/pkg/logging"
9-
"golang.org/x/net/context"
1011
)
1112

1213
var (

central/metadata/service/service_impl.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
package service
22

33
import (
4+
"context"
5+
46
"github.com/grpc-ecosystem/grpc-gateway/runtime"
57
"github.com/stackrox/rox/central/license/manager"
68
v1 "github.com/stackrox/rox/generated/api/v1"
79
"github.com/stackrox/rox/pkg/buildinfo"
810
"github.com/stackrox/rox/pkg/concurrency"
911
"github.com/stackrox/rox/pkg/grpc/authz/allow"
1012
"github.com/stackrox/rox/pkg/version"
11-
"golang.org/x/net/context"
1213
"google.golang.org/grpc"
1314
)
1415

central/notifier/service/service_impl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package service
22

33
import (
4+
"context"
45
"fmt"
56

67
"github.com/grpc-ecosystem/grpc-gateway/runtime"
@@ -17,7 +18,6 @@ import (
1718
"github.com/stackrox/rox/pkg/grpc/authz/perrpc"
1819
"github.com/stackrox/rox/pkg/grpc/authz/user"
1920
"github.com/stackrox/rox/pkg/secrets"
20-
"golang.org/x/net/context"
2121
"google.golang.org/grpc"
2222
"google.golang.org/grpc/codes"
2323
"google.golang.org/grpc/status"

central/policy/service/service.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package service
22

33
import (
4+
"context"
5+
46
clusterDataStore "github.com/stackrox/rox/central/cluster/datastore"
57
deploymentDataStore "github.com/stackrox/rox/central/deployment/datastore"
68
"github.com/stackrox/rox/central/detection"
@@ -13,7 +15,6 @@ import (
1315
v1 "github.com/stackrox/rox/generated/api/v1"
1416
"github.com/stackrox/rox/pkg/expiringcache"
1517
"github.com/stackrox/rox/pkg/grpc"
16-
"golang.org/x/net/context"
1718
)
1819

1920
// Service provides the interface to the microservice that serves alert data.

0 commit comments

Comments
 (0)