Commit f4a87ba
rage: fix {hostname} not substituted in sub-paste titles
Summary:
The `rage.reporter` config contains a `{hostname}` placeholder (e.g. `pastry --title "eden rage from {hostname}"`). `RageCmd.run()` in `main.py` correctly substituted this via `str.format(hostname=socket.getfqdn())`, but `print_diagnostic_info()` in `rage.py` and `upload_logs()` in `debug.py` read the same config without substitution. This caused every sub-paste created during a rage (verbose logs, watchman logs, crash logs, etc.) to have a literal `{hostname}` in the title — see P2292964945 for an example.
This diff extracts the config-read-and-substitute logic into `get_rage_reporter()` and uses it in all three call sites.
Reviewed By: kavehahmadi60
Differential Revision: D103877922
fbshipit-source-id: 175e55fc636c4c4bdb5c80574b40134b5bf27c251 parent 583958d commit f4a87ba
3 files changed
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1384 | 1384 | | |
1385 | 1385 | | |
1386 | 1386 | | |
1387 | | - | |
1388 | | - | |
| 1387 | + | |
1389 | 1388 | | |
1390 | 1389 | | |
1391 | 1390 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
3067 | 3066 | | |
3068 | 3067 | | |
3069 | 3068 | | |
3070 | | - | |
3071 | | - | |
3072 | | - | |
3073 | | - | |
| 3069 | + | |
3074 | 3070 | | |
3075 | 3071 | | |
3076 | 3072 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
134 | 140 | | |
135 | 141 | | |
136 | 142 | | |
| |||
375 | 381 | | |
376 | 382 | | |
377 | 383 | | |
378 | | - | |
| 384 | + | |
379 | 385 | | |
380 | 386 | | |
381 | 387 | | |
| |||
0 commit comments