This change adds support for a new change identifier in the /changes
REST API endpoint. It follows the discussion on
Idac92e61ee1471b074034eef39901b1b8e961706 and the two recent Gerrit
Hackathons.
The new change identifier serves multiple purposes:
1) Since it contains the project name, we can directly construct the
ChangeApi without a secondary index lookup. This means that we can
still serve requests to some endpoints, even in case of a complete
index failure.
When the project is added in the UI, we will still be able to serve
change pages in case of an index failure. While the triplet also
contains the project, it is unfeasible for the UI since it requires a
branch name (which we don't want to have in the UI URLs) and has the
changeId instead of the change number.
2) Reducing the number of secondary index lookups is a performance gain.
3) The project name being contained in the URL enables load balancers
to shard requests based on the project without a need for an index
lookup (which most load balancers do not support). The sharding
configuration can then be as easy as a regular expression and a
static project-to-machine mapping.
4) This change is also a first step in deprecating the other three
change identifiers and unifying our API access pattern. This will
happen gradually in upcoming changes. Also the UI will be adapted.
This change also adds extensive testing to both the new parsing logic as
well as all change identifiers in both the Java and the REST API.
Change-Id: I7a904fdd001c065af9897d9c08edce1cfbd43a14