Describe the bug
When setting up dkron, we were using webhook-url to update the job's results in another place. Suddenly it stopped working when we updated our fork from upstream. Looking at the code, we noticed an important change in dkron/config.go: webhook-url was being deprecated by `webhook-endpoint .
I am not entirely familiar with spf13 framework for flag parsing but the code reads like it accepts both: https://github.com/distribworks/dkron/blob/f051261f1fbbbe363750c22633444f6ecf528c61/dkron/config.go#L150
The truth of the matter is that, well, it doesn't. Only webhook-endpoint works. That had me thinking maybe it's not supposed to accept both flag and this is indeed a typo.
To Reproduce
Steps to reproduce the behavior:
- Add
webhook-url: <something> in your dkron.yml file.
- Run a job
- Notice the webhook is never called.
Expected behavior
If you'd like dkron to support both flags, then this logic has to be tweaked.
If you'd like dkron to only support webhook-endpoint config setting, then the latter bit of code should disappear.
If it's the latter, I can submit a PR for this change.
Screenshots
N/A
** Specifications:**
- OS: CentOS
- Version 3.1.11
Additional context
N/A
Describe the bug
When setting up
dkron, we were usingwebhook-urlto update the job's results in another place. Suddenly it stopped working when we updated our fork from upstream. Looking at the code, we noticed an important change indkron/config.go:webhook-urlwas being deprecated by `webhook-endpoint .I am not entirely familiar with spf13 framework for flag parsing but the code reads like it accepts both: https://github.com/distribworks/dkron/blob/f051261f1fbbbe363750c22633444f6ecf528c61/dkron/config.go#L150
The truth of the matter is that, well, it doesn't. Only
webhook-endpointworks. That had me thinking maybe it's not supposed to accept both flag and this is indeed a typo.To Reproduce
Steps to reproduce the behavior:
webhook-url: <something>in yourdkron.ymlfile.Expected behavior
If you'd like dkron to support both flags, then this logic has to be tweaked.
If you'd like dkron to only support webhook-endpoint config setting, then the latter bit of code should disappear.
If it's the latter, I can submit a PR for this change.
Screenshots
N/A
** Specifications:**
Additional context
N/A