Commit Graph

13 Commits

Author SHA1 Message Date
Tylen Wells 1e02613a51 implement --hooks-async 2025-07-01 16:28:52 -07:00
Tim Hockin 913a6be647 Bump go and golangci-lint versions, fix lint 2025-03-24 13:43:12 -07:00
Tim Hockin 9318041657 Better logging around hooks
This also returns stderr distinct from stdout.
2023-05-24 10:52:21 -07:00
Tim Hockin 3ca8099d2d Use logger.WithName() for web/exechook
This makes logs easier to comprehend, since hooks are async.
2022-03-17 12:10:39 -07:00
Kubernetes Prow Robot 10fd8e662b
Merge pull request #476 from thockin/v4-double-register-hook-metric
Don't double-register the hook metric (v4)
2022-01-23 01:17:56 -08:00
Tim Hockin 2a611a72c0 Don't double-register the hook metric 2022-01-22 14:24:47 -08:00
Tim Hockin c143bfd31a Small cleanup on one-time x hooks 2022-01-19 11:48:50 -08:00
ChrisERo ad6a34abb5 refactor: corrected variable names and logs inside HookRunner.WaitForCompletion 2022-01-15 15:23:06 -05:00
ChrisERo 8827bf7489 refactor: imporved efficiency and code style
* changed sendCompletedOnceMessageIfApplicable so that it kills thread
  after executing
* moved logic for waiting on HookRunner into function defined in
  HookRunner itself
2022-01-14 13:41:59 -05:00
ChrisERo 0df6e005d3 refactor: fixed in-line documentation and added line-wraps where needed 2022-01-10 20:06:23 -05:00
ChrisERo 3b5ed549eb fix: addressed several concers raised by thockin
- Renamed [x]HookChannel to [x]hookChannel for consistency
- Made hookChannels buffered chanels of size 1
- Added clarifying documentation and renamed functions expalining how I was
    - ensuring that hooks execute at least once, assuming that main thread does not crash
    - make sure chanels are not written to more than once
2022-01-10 20:06:06 -05:00
ChrisERo 9e6348c3b5 fix: resolve issue number 463
Resolved original issue by introducing a boolean chanel by which exechook runner can communicate with main thread.
Then introduced and used webhook executed-at-least-once chanel and added documentation explaining sections of of code
only executed when git-sync pulls for first time.
2022-01-10 20:05:53 -05:00
Tim Hockin 0075df238c Make exechooks work like webhooks.
This deprecates the `--sync-hook-command` flag in favor of
`--exechook-command`, `--exechook-timeout`, and `--exechook-backoff`.
2021-08-16 23:21:20 -07:00