Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shifted opa engine warning message to debug log level #800

Merged
merged 1 commit into from
May 20, 2021

Conversation

devang-gaur
Copy link
Contributor

fixes #709

@sonarcloud
Copy link

sonarcloud bot commented May 20, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@codecov
Copy link

codecov bot commented May 20, 2021

Codecov Report

Merging #800 (5641a0a) into master (bea2473) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #800   +/-   ##
=======================================
  Coverage   74.75%   74.75%           
=======================================
  Files         111      111           
  Lines        3324     3324           
=======================================
  Hits         2485     2485           
  Misses        654      654           
  Partials      185      185           
Impacted Files Coverage Δ
pkg/policy/opa/engine.go 65.57% <100.00%> (ø)

@@ -345,7 +345,7 @@ func (e *Engine) Evaluate(engineInput policy.EngineInput) (policy.EngineOutput,
// Execute the prepared query.
rs, err := e.regoDataMap[k].PreparedQuery.Eval(e.context, rego.EvalInput(engineInput.InputData))
if err != nil {
zap.S().Warn("failed to run prepared query", zap.Error(err), zap.String("rule", "'"+k+"'"), zap.String("file", e.regoDataMap[k].Metadata.File))
zap.S().Debug("failed to run prepared query", zap.Error(err), zap.String("rule", "'"+k+"'"), zap.String("file", e.regoDataMap[k].Metadata.File))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we decrement the ruleCount when Eval fails?

@kanchwala-yusuf kanchwala-yusuf merged commit 696481d into tenable:master May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to run prepared query error in opa/engine.go
3 participants