Skip to content

Add EvalDebugEnabled env variable#235

Merged
zhouzhuojie merged 1 commit into
masterfrom
zz/add-global-switch-of-eval-debug
Mar 11, 2019
Merged

Add EvalDebugEnabled env variable#235
zhouzhuojie merged 1 commit into
masterfrom
zz/add-global-switch-of-eval-debug

Conversation

@zhouzhuojie
Copy link
Copy Markdown
Collaborator

@zhouzhuojie zhouzhuojie commented Mar 9, 2019

Description

Fix #228

Motivation and Context

Add an option so that we can disable evaluation debug globally due to security reasons. By default, it's enabled.

How Has This Been Tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #235 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #235   +/-   ##
=======================================
  Coverage   83.87%   83.87%           
=======================================
  Files          24       24           
  Lines        1433     1433           
=======================================
  Hits         1202     1202           
  Misses        174      174           
  Partials       57       57
Impacted Files Coverage Δ
pkg/handler/eval.go 78.16% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 65fd5b9...ec943b2. Read the comment docs.

Comment thread pkg/config/env.go
// Note that this is a global switch:
// if it's disabled, no evaluation debug info will be returned.
// if it's enabled, it respects evaluation request's enableDebug field
EvalDebugEnabled bool `env:"FLAGR_EVAL_DEBUG_ENABLED" envDefault:"true"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

True as default? I would make it less intrusive ...

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

True is the current behavior. It controls globally if the server will need to respect the "enableDebug" filed from the request. https://checkr.github.io/flagr/api_docs/#operation/postEvaluation

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I wasn't aware, good to know 😄

@zhouzhuojie zhouzhuojie merged commit 82dcc45 into master Mar 11, 2019
@zhouzhuojie zhouzhuojie deleted the zz/add-global-switch-of-eval-debug branch March 11, 2019 21:36
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.

Disable enableDebug Propery for Evaluation Transactions

3 participants