diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-09-16 09:20:39 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2020-09-16 09:20:39 +0300 |
commit | b44de3009cd851681a21565a37d4072474aaf2cd (patch) | |
tree | e43c5a16b92d118c2ae91c0da6f53ac2473ebb69 /changelogs | |
parent | b81ed87e4e8330295d0e12cd70a04e96c41e6992 (diff) |
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.
Diffstat (limited to 'changelogs')
-rw-r--r-- | changelogs/unreleased/pks-ruby-reftx-hook.yml | 5 |
1 files changed, 5 insertions, 0 deletions
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 |