xref: /aosp_15_r20/external/grpc-grpc/tools/interop_matrix/patches/README.md (revision cc02d7e222339f7a4f6ba5f422e6413f4bd931f2)
1*cc02d7e2SAndroid Build Coastguard Worker# Patches to grpc repo tags for the backwards compatibility interop tests
2*cc02d7e2SAndroid Build Coastguard Worker
3*cc02d7e2SAndroid Build Coastguard WorkerThis directory has patch files that can be applied to different tags
4*cc02d7e2SAndroid Build Coastguard Workerof the grpc git repo in order to run the interop tests for a specific
5*cc02d7e2SAndroid Build Coastguard Workerlanguage based on that tag.
6*cc02d7e2SAndroid Build Coastguard Worker
7*cc02d7e2SAndroid Build Coastguard WorkerFor example, because the ruby interop tests do not run on the v1.0.1 tag out
8*cc02d7e2SAndroid Build Coastguard Workerof the box, but we still want to test compatibility of the 1.0.1 ruby release
9*cc02d7e2SAndroid Build Coastguard Workerwith other versions, we can apply a patch to the v1.0.1 tag from this directory
10*cc02d7e2SAndroid Build Coastguard Workerthat makes the necessary changes that are needed to run the ruby interop tests
11*cc02d7e2SAndroid Build Coastguard Workerfrom that tag. We can then use that patch to build the docker image for the
12*cc02d7e2SAndroid Build Coastguard Workerruby v1.0.1 interop tests.
13*cc02d7e2SAndroid Build Coastguard Worker
14*cc02d7e2SAndroid Build Coastguard Worker## How to add a new patch to this directory
15*cc02d7e2SAndroid Build Coastguard Worker
16*cc02d7e2SAndroid Build Coastguard WorkerPatch files in this directory are meant to be applied to a git tag
17*cc02d7e2SAndroid Build Coastguard Workerwith a `git apply` command.
18*cc02d7e2SAndroid Build Coastguard Worker
19*cc02d7e2SAndroid Build Coastguard Worker1. Under the `patches` directory, create a new subdirectory
20*cc02d7e2SAndroid Build Coastguard Workertitled `<language>_<git_tag>` for the git tag being modified.
21*cc02d7e2SAndroid Build Coastguard Worker
22*cc02d7e2SAndroid Build Coastguard Worker2. `git checkout <git_tag>`
23*cc02d7e2SAndroid Build Coastguard Worker
24*cc02d7e2SAndroid Build Coastguard Worker3. Make necessary modifications to the git repo at that tag.
25*cc02d7e2SAndroid Build Coastguard Worker
26*cc02d7e2SAndroid Build Coastguard Worker4.
27*cc02d7e2SAndroid Build Coastguard Worker
28*cc02d7e2SAndroid Build Coastguard Worker```
29*cc02d7e2SAndroid Build Coastguard Workergit diff > ~/git_repo.patch
30*cc02d7e2SAndroid Build Coastguard Workergit checkout <current working branch>
31*cc02d7e2SAndroid Build Coastguard Workercp ~/git_repo.patch tools/interop_matrix/patches/<language>_<git_tag>/
32*cc02d7e2SAndroid Build Coastguard Worker```
33*cc02d7e2SAndroid Build Coastguard Worker
34*cc02d7e2SAndroid Build Coastguard Worker5. Edit the `LANGUAGE_RELEASE_MATRIX` in `client_matrix.py` for your language/tag
35*cc02d7e2SAndroid Build Coastguard Workerand add a `'patch': [<files>,....]` entry to it's `dictionary`.
36*cc02d7e2SAndroid Build Coastguard Worker
37*cc02d7e2SAndroid Build Coastguard WorkerAfter doing this, the interop image creation script can apply that patch to the
38*cc02d7e2SAndroid Build Coastguard Workertag with `git apply` before uploading to the test image repo.
39