Commit Graph

9 Commits

Author SHA1 Message Date
Tim Fox
cbddfe0e10 Implement all the fields of changeset for passing to hooks
Summary: This test implements the passing of all current changeset fields to hooks

Reviewed By: StanislavGlebik

Differential Revision: D8298019

fbshipit-source-id: 0e6be3c83b1e4d4c3eab95c76c9041ea2a57f0d3
2018-06-08 03:50:30 -07:00
Lukas Piatkowski
4f44c3f130 mercurial_types: remove D* types and move mercurial types around
Summary:
Now it is as it should be: mercurial_types have the types, mercurial has revlog related structures
burnbridge

Reviewed By: farnz

Differential Revision: D8319906

fbshipit-source-id: 256e73cdd1b1a304c957b812b227abfc142fd725
2018-06-07 13:19:16 -07:00
Tim Fox
acd3a7587e Add unit tests for runhook command line utility
Summary: This diff adds unit tests for the runhook command line utility

Reviewed By: jsgf

Differential Revision: D8257571

fbshipit-source-id: 5c390d2a45d895080fce28dcd7943da5d803ff92
2018-06-07 08:36:41 -07:00
Tim Fox
32dd998895 Add tests for different types of Lua hook errors
Summary:
This diff adds more robust testing for various errors in Lua hooks.
It also contains a little bit of cleanup in the runHook command

Reviewed By: StanislavGlebik

Differential Revision: D8253525

fbshipit-source-id: de9d298e70ec647f2c13e27c9937605ac5b57485
2018-06-07 08:36:41 -07:00
Lukas Piatkowski
27bdcb40b2 filenodes: control size of the connection pool
Summary:
The new_blobimport job is having difficulties when the pool is too large, because the write transactions are taking too long. If the pool is configured to be 1 for it then everything seems fine and fast enough.
On the other hand the Mononoke server should have bigger connectino pool size to be able to quickly respond for read requests.

Reviewed By: farnz

Differential Revision: D8235413

fbshipit-source-id: 84e0013ce569c3f103a2096001605aab828d178c
2018-06-05 05:58:31 -07:00
Tim Fox
3c46a1d9c3 Return executions as map from hookmanager.run_hooks and create a richer HookExecution type
Summary:
Now hook manager returns result of running hooks as BoxFuture<HashMap<String, HookExecution> where HookExecution is a new richer type representing the result of running a hook.
This provides more info to the user as to why the hook rejected the changeset and a map is simpler to lookup a particular hook failure than a Vec.

Reviewed By: StanislavGlebik

Differential Revision: D8235970

fbshipit-source-id: 9a617b6d459f105aa9dad9782e784459dd716c45
2018-06-04 04:15:09 -07:00
Tim Fox
a8a5e3f1ee Implement HookManager install and uninstall of hooks and running hooks on cpu pool
Summary:
This diff introduces HookManager which knows how to install, uninstall and run hooks.
Hooks are now run in parallel on a cpu_pool.

Reviewed By: lukaspiatkowski

Differential Revision: D8208538

fbshipit-source-id: f18687c14a15cadf4d832318cd66fa400586c29f
2018-05-31 07:21:00 -07:00
Tim Fox
790bf3aa6c Rename hooks->hooks_old and hooks2->hooks
Summary: Rename the old hooks implementation to hooks_old

Reviewed By: StanislavGlebik

Differential Revision: D8187045

fbshipit-source-id: 50f849250f42436ee0db142aab721a12b7d95672
2018-05-30 02:03:20 -07:00
Tim Fox
b00bef4efb Implement runhook command
Summary: This diff introduces a simple command line utility which allows a hook to be run against a specific changeset. The idea is to allow hooks to be easily tested without having to run a Mononoke server.

Reviewed By: StanislavGlebik

Differential Revision: D8183908

fbshipit-source-id: 2ebadf026a23ac69bc14db6794fdf760728f1d3b
2018-05-30 02:03:20 -07:00