Commit a709ed8
authored
fix(ci): assert that patches apply exactly (#508)
From `man patch`
```
-F max-fuzz, --fuzz max-fuzz
Sets the maximum fuzz factor. This option only applies to
context diffs, and causes patch to ignore up to that many lines
in looking for places to install a hunk. Note that a larger fuzz
factor increases the odds of a faulty patch. The default fuzz
factor is 2, and it may not be set to more than the number of
lines of context in the context diff, ordinarily 3.
```
The hint was in our CI job which passes but prints
```
Run patch --dry-run -p1 < .bcr/patches/*.patch
checking file MODULE.bazel
Hunk #1 succeeded at 45 with fuzz 2 (offset 4 lines).
Hunk #2 succeeded at 61 with fuzz 2 (offset 3 lines).
```
When Bazel or the Publish to BCR app apply the patches, they don't use
the `patch` tool so they don't allow any variation in the patch lines.
Our assertion needs to be strict.
Fixes #5061 parent 5139790 commit a709ed8
File tree
3 files changed
+12
-11
lines changed- .bcr/patches
- .github/workflows
- e2e/use_release
3 files changed
+12
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | | - | |
36 | 35 | | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
0 commit comments