Closed reitermarkus closed 4 years ago
Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide.
Tip: if you only have one commit so far then run: git commit --amend --signoff
and then git push --force
.
Please fill out the whole issue template, it's required for all contributors to follow the process outlined by the community. Thank you for your interest.
Thank you for your contribution. I've just checked and your commit doesn't appear to be signed-off. That's something we need before your Pull Request can be merged. Please see our contributing guide.
Tip: if you only have one commit so far then run: git commit --amend --signoff
and then git push --force
.
The commit message subject looks good 👍 and thanks for signing off.
Could you fill out the body of the commit with some notes for the commit log? A year or so ago I found this blog post useful for learning how to create useful messages: https://chris.beams.io/posts/git-commit/
Added some more detail to the commit messages.
https://github.com/openfaas-incubator/of-watchdog/pull/87/files#discussion_r347115625
Thank you for your opinion. Please could you change this as per the request? I believe that it's the only remaining item :+1:
Thank you for your opinion. Please could you change this as per the request?
I'm not sure exactly what happened here. I argued that a subcommand is more appropriate than a flag in this case and you dismiss my opinion while thanking me and telling me how to idiomatically parse a command line flag.
can you raise a similar PR for the classic watchdog?
If someone wants new features shouldn't they already be using of-watchdog
anyways?
I realise I didn't give you a very detailed explanation of why this is needed for the classic watchdog. I hope you can trust my opinion as the maintainer and lead of the project? This will need to be applied to the classic watchdog for backwards compatibility with the classic templates and for existing users.
As for switch flag.Arg(0)
, I asked you to add a unit test and to change to what we use everywhere else in the project for consistency.
One of the things you declared in the PR template was:
[x] My code follows the code style of this project.
This change does not follow the style of the project, so I'm trying to help you (I didn't expect an argument)
Here's what I was looking for, which also documents the behaviour of the flag and shows up on of-watchdog --help
(your example does not)
var runHealthcheck bool
flag.BoolVar(&runHealthcheck, "run-healthcheck", false, "Check for the a lock-file, when using an exec healthcheck. Exit 0 for present, non-zero when not found.")
flag.Parse()
if runHealthcheck {
if lockFilePresent() {
os.Exit(0)
}
fmt.Fprintf(os.Stderr, "unable to find lock file\n")
os.Exit(1)
}
Example:
fprocess=date ./of-watchdog -help
Usage of ./of-watchdog:
-run-healthcheck
Check for the a lock-file, when using an exec healthcheck. Exit 0 for present, non-zero when not found.
Description
Implements and closes https://github.com/openfaas-incubator/of-watchdog/issues/86.
Motivation and Context
Explained in https://github.com/openfaas-incubator/of-watchdog/issues/86.
How Has This Been Tested?
This was tested using a static website template:
Types of changes
Checklist:
git commit -s