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

bug: hook_conf must be present in debug.yaml, otherwise it will throw an exception #7159

Closed
amrellafy opened this issue May 28, 2022 · 8 comments
Assignees
Labels
good first issue Good for newcomers

Comments

@amrellafy
Copy link

Current Behavior

if hook_config is not present, the following exception will be thrown

apisix attempt to index local 'hook_conf' (a nil value)

local hook_conf = debug_yaml.hook_conf
should include a check.

Expected Behavior

not throwing an error if hook_conf is not present.

Error Logs

No response

Steps to Reproduce

  1. create a debug.yaml
  2. do not incude hook_conf

Environment

  • APISIX version 2.14.1
  • on Docker
@spacewander
Copy link
Member

The hook_conf is present by default:

hook_conf:

Are there some user cases people need to remove the default hook_conf?

@amrellafy
Copy link
Author

per the documentation, hook_conf is only required in advanced debugging.

@tzssangglass
Copy link
Member

per the documentation, hook_conf is only required in advanced debugging.

hook_conf is part of the debug.yaml structure. Just because it is needed for advanced debugging does not mean that it can be removed if advanced debugging is not enabled.

But we could be clearer on this point in the documentation?

@spacewander
Copy link
Member

@amrellafy
Copy link
Author

per the documentation, hook_conf is only required in advanced debugging.

hook_conf is part of the debug.yaml structure. Just because it is needed for advanced debugging does not mean that it can be removed if advanced debugging is not enabled.

But we could be clearer on this point in the documentation?

For sure, maybe make it clearer. Thanks!

@spacewander
Copy link
Member

Would you like to work for it?

@amrellafy
Copy link
Author

Sure, if you get access to push.

@spacewander
Copy link
Member

Sure, if you get access to push.

PR is welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants