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

Setting the status or decision log console option to false produces a config error #4291

Closed
tsandall opened this issue Jan 27, 2022 · 0 comments · Fixed by #4302
Closed

Setting the status or decision log console option to false produces a config error #4291

tsandall opened this issue Jan 27, 2022 · 0 comments · Fixed by #4302
Labels

Comments

@tsandall
Copy link
Member

Running OPA with status or decision console logging set to false produces a config error:

$ opa run -s --set decision_logs.console=false
error: config error: invalid decision_log config, must have a `service`, `plugin`, or `console` logging enabled
$ opa run -s --set status.console=false
error: config error: invalid status config, must have a `service`, `plugin`, or `console` logging specified

There's no reason that setting the default value explicitly should cause an error.

@tsandall tsandall added the bug label Jan 27, 2022
anderseknert added a commit to anderseknert/opa that referenced this issue Jan 28, 2022
Move the check for "emptiness" before validation and
injection of defaults, as there isn't a whole lot we
can do with a logging plugin that doesn't actually
log anything. Rather than error though, just return
nil to skip initialization of the plugin.

Fixes open-policy-agent#4291

Signed-off-by: Anders Eknert <anders@eknert.com>
srenatus pushed a commit that referenced this issue Jan 29, 2022
Move the check for "emptiness" before validation and
injection of defaults, as there isn't a whole lot we
can do with a logging plugin that doesn't actually
log anything. Rather than error though, just return
nil to skip initialization of the plugin.

Fixes #4291

Signed-off-by: Anders Eknert <anders@eknert.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant