Homec4science

Promote instance identity to the upstream and pass it to commit hooks

Authored by epriestley <git@epriestley.com> on Jan 27 2015, 23:51.

Description

Promote instance identity to the upstream and pass it to commit hooks

Summary:
Fixes T7019. In a cluster environment, pushes currently fail because the commit hook can't identify the instance.

For web processes, the hostname identifies the instance -- but we don't have a hostname in the hook.

For CLI processes, the environment identifies the instance -- but we don't have an environment in the hook under SVN.

Promote the instance identifier into the upstream and pack/unpack it explicitly for hooks. This is probably not useful for anyone but us, but the amount of special-purpose code we're introducing is very small.

I poked at trying to do this in a more general way, but:

  • We MUST know this BEFORE we run code, so the normal subclassing stuff is useless.
  • I couldn't come up with any other parameter which might ever be useful to pass in.

Test Plan: Used git push to push code through proxied HTTP, got a clean push.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7019

Differential Revision: https://secure.phabricator.com/D11495

Details

Committed
epriestley <git@epriestley.com>Jan 27 2015, 23:51
Pushed
aubortJan 31 2017, 17:16
Parents
rPHfb5e50e6cc1f: Proxy VCS HTTP requests
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHd8550c114d70: Promote instance identity to the upstream and pass it to commit hooks (authored by epriestley <git@epriestley.com>).Jan 27 2015, 23:51