From b44de3009cd851681a21565a37d4072474aaf2cd Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 16 Sep 2020 08:20:39 +0200 Subject: hooks: Call reference-transaction hook from Ruby HooksService When modifying Git references, we want to perform voting on the change that's about to be made to enable strong consistency. While we're currently emulating this behaviour mostly via the pre-receive hook, eventually we'll want to fully migrate to the new reference-transaction hook. This buys us more granularity, allows us to capture reference updates across all commands and also allows us to abort any update. To reach this goal, there's two steps we need to do: first we need to always invoke Git with appropriate environment variables to make our reference-transaction hook implementation aware of the ongoing transaction. And second we'll need to adjust places where we manually call out to Git hooks. This commit addresses the second part for our Ruby sidecar, invoking the reference-transaction hook in the hooks service. As the hook implementation is currently hidden behind a feature flag, this commit also sets up a separate feature flag for Ruby. If set, it knows to set up the correct environment variables required by our hook implementation to execute the actual logic. --- changelogs/unreleased/pks-ruby-reftx-hook.yml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelogs/unreleased/pks-ruby-reftx-hook.yml (limited to 'changelogs') diff --git a/changelogs/unreleased/pks-ruby-reftx-hook.yml b/changelogs/unreleased/pks-ruby-reftx-hook.yml new file mode 100644 index 000000000..a39abc55e --- /dev/null +++ b/changelogs/unreleased/pks-ruby-reftx-hook.yml @@ -0,0 +1,5 @@ +--- +title: 'hooks: Call reference-transaction hook from Ruby HooksService' +merge_request: 2566 +author: +type: added -- cgit v1.2.3