Fail apply-object on change /meta when missing patch-set

The execution of apply-object of changes /meta ref has no
guarantee to be executed after the successful replication of
the associated patch-set.

Updating the repository with the change /meta pointing to
a missing patch-set, albeit legal from a repo's perspective,
it would cause errors in Gerrit at multiple levels:
- the change screen would not render and produce 500s
- the reindex may fail
- the comments may succeed on repo but fail to be reindexed

It is way better to fail the apply-object and let the
replication to fallback to async fetch rather than putting
the change in an inconsistent state.

Return an HTTP status 412 (PRECONDITION FAILED) with the
patch-set ref that was a precondition for the apply-object
of the /meta ref to be executed.

Change-Id: I607cc62af96dc2aae3972673ebd94f4a7fee603d
9 files changed
tree: 7c6dba53aeff3cf0a5cc1d39651b24438271ba5a
  1. example-setup/
  2. src/
  3. .gitignore
  4. BUILD
  5. Jenkinsfile
  6. LICENSE