hydra: Janitor does not report connection errors and ignores logging level
Describe the bug
I haven’t run into any SQL errors yet, but running the Janitor command with incorrect database credentials will give the impression that everything is working fine.
It also seems to ignore the log level set in a config file.
Reproducing the bug
Steps to reproduce the behavior:
- Run
d./hydra janitor --requests --tokens -c hydra.yml
You’ll get back the following
{"audience":"application","level":"info","msg":"No tracer configured - skipping tracing setup","service_name":"ORY Hydra","service_version":"v1.10.6","time":"2021-09-09T18:47:07Z"}
Successfully completed Janitor run on access tokens
Successfully completed Janitor run on refresh tokens
Successfully completed Janitor run on login-consent requests
In the above example my hydra.yml file had incorrect login credentials for my database server. I had also set the log level to debug.
I know the config file is correct because if I do put the correct credentials in, my database tables are pruned.
Expected behavior
Some error message indicating a connection error
Environment
- Version: v1.10.6, git sha f1771f13dd954b37330d4e90d89df41fc40be460
- Environment: Ubuntu 20.0.4, AWS MySQL RDS cluster
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 15 (15 by maintainers)
@jay-lark @Benehiko I could not reproduce.
Am I missing something?
janitorGives
update
Checked out the commit https://github.com/ory/hydra/commit/f1771f13dd954b37330d4e90d89df41fc40be460. Indeed it does not complain about anything. Seems fixed on master. @aeneasr can you confirm ?