-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Hooks #190
Hooks #190
Conversation
|
cmd := exec.Command(hook) | ||
cmd.Env = this.applyEnvironmentVairables(extraVariables...) | ||
|
||
if err := cmd.Run(); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be helpful to pipe hook output (stdout & stderr) to gh-ost's standard output, especially for troubleshooting hook errors.
This might be out of scope of this PR. If so, and you are interested in the idea, I am happy to submit a PR once this is merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. If this is to be done, it will be done in this PR.
Is there any sense in having this configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I lean towards not having it configurable until someone needs it. An operator can simply choose not to output anything from the hook executable.
hook |
Insofar this is looking good in testing. Merging, and will iterate if need be. |
Documentation is on https://github.com/github/gh-ost/blob/master/doc/hooks.md |
Hooks
Storyline: #62
This PR introduces hooks, processes to be executed by
gh-ost
at particular points of interest (e.g. startup, validated, starting postpone, success, status etc.)gofmt
(please avoidgoimports
)./build.sh
./test.sh