feat: kubesphere 4.0 (#6115)
* feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> * feat: kubesphere 4.0 Signed-off-by: ci-bot <ci-bot@kubesphere.io> --------- Signed-off-by: ci-bot <ci-bot@kubesphere.io> Co-authored-by: ks-ci-bot <ks-ci-bot@example.com> Co-authored-by: joyceliu <joyceliu@yunify.com>
This commit is contained in:
committed by
GitHub
parent
b5015ec7b9
commit
447a51f08b
8
vendor/github.com/open-policy-agent/opa/topdown/query.go
generated
vendored
8
vendor/github.com/open-policy-agent/opa/topdown/query.go
generated
vendored
@@ -471,6 +471,14 @@ func (q *Query) Run(ctx context.Context) (QueryResultSet, error) {
|
||||
// Iter executes the query and invokes the iter function with query results
|
||||
// produced by evaluating the query.
|
||||
func (q *Query) Iter(ctx context.Context, iter func(QueryResult) error) error {
|
||||
// Query evaluation must not be allowed if the compiler has errors and is in an undefined, possibly inconsistent state
|
||||
if q.compiler != nil && len(q.compiler.Errors) > 0 {
|
||||
return &Error{
|
||||
Code: InternalErr,
|
||||
Message: "compiler has errors",
|
||||
}
|
||||
}
|
||||
|
||||
if q.seed == nil {
|
||||
q.seed = rand.Reader
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user