Commit 73d44ec
authored
[Fix] Correctly set testcase build url and gn args for fuzzing on batch (#5013)
Fix missing testcase metadata when fuzz task is running on batch (or any
non-local execution).
#### Context
Some build-related environment variables (`build_url`, `build_key` and
`gn_args_path`) are set during the build setup on fuzz task main stage.
These should be retrieved during postprocess to set the testcase's
metadata, which is used to display the build url and the gn args config
section on the clusterfuzz UI.
However, for non-local execution, these variables are not propagated
through the `uworker_output` proto and are missing in postprocess, so
any testcase created during fuzzing on batch is not displaying these
values.
#### Changes
* Added the `build_url`, `build_key` and `gn_args` fields to the fuzz
task output message.
* Added the logic to store these fields and use them to set the initial
testcase metadata.
#### Tests
* Testing on development environment is ineffective as it is not
currently running fuzz tasks on batch. I deployed to dev anyway and
confirmed that, at least, the local execution of fuzz tasks is still
working.
* Testing on prod (deployed this PR to internal)
* Fuzzing hours stable after deploy:
https://screenshot.googleplex.com/7JfregzBR8F6MRA.png
* Logs for fuzz tasks executing on batch:
https://cloudlogging.app.goo.gl/5xXpLjUdwzK6wTeR9 (main) and
https://cloudlogging.app.goo.gl/nX832G1782asdMDXA (postprocess)
* Logs for fuzz tasks executing on GCE VMs:
https://cloudlogging.app.goo.gl/61nvxR1BwQrQnvXr8 (main) and
https://cloudlogging.app.goo.gl/6yoQSvU8r1mUVxsN7 (postprocess)
* Evidence of testcases creates after the deploy containing the build
url and GN config args:
* GCE VMs (local exec):
https://clusterfuzz.com/testcase-detail/6746169883426816
* Batch: https://clusterfuzz.com/testcase-detail/6451774202249216
* Build URL: https://screenshot.googleplex.com/45n7M75hEPoEsNZ.png
* GN Configs: https://screenshot.googleplex.com/9r3SxRPRQRyC4tv.png
Bug: b/441128474
Related issue: #49141 parent 5386621 commit 73d44ec
File tree
6 files changed
+130
-44
lines changed- src/clusterfuzz/_internal
- bot/tasks/utasks
- datastore
- protos
- tests/core/datastore
6 files changed
+130
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1002 | 1002 | | |
1003 | 1003 | | |
1004 | 1004 | | |
| 1005 | + | |
1005 | 1006 | | |
1006 | 1007 | | |
1007 | | - | |
| 1008 | + | |
1008 | 1009 | | |
1009 | 1010 | | |
1010 | 1011 | | |
1011 | 1012 | | |
1012 | 1013 | | |
1013 | 1014 | | |
1014 | 1015 | | |
1015 | | - | |
| 1016 | + | |
1016 | 1017 | | |
1017 | 1018 | | |
1018 | 1019 | | |
| |||
1036 | 1037 | | |
1037 | 1038 | | |
1038 | 1039 | | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
1039 | 1049 | | |
1040 | 1050 | | |
1041 | 1051 | | |
| |||
1879 | 1889 | | |
1880 | 1890 | | |
1881 | 1891 | | |
| 1892 | + | |
1882 | 1893 | | |
1883 | 1894 | | |
1884 | 1895 | | |
| |||
2241 | 2252 | | |
2242 | 2253 | | |
2243 | 2254 | | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
| 2258 | + | |
| 2259 | + | |
| 2260 | + | |
| 2261 | + | |
| 2262 | + | |
2244 | 2263 | | |
2245 | 2264 | | |
2246 | 2265 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
838 | | - | |
839 | | - | |
840 | | - | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
| 837 | + | |
| 838 | + | |
847 | 839 | | |
848 | 840 | | |
849 | 841 | | |
| |||
856 | 848 | | |
857 | 849 | | |
858 | 850 | | |
859 | | - | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
860 | 878 | | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
861 | 886 | | |
862 | 887 | | |
863 | 888 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
264 | 267 | | |
265 | 268 | | |
266 | 269 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1250 | 1250 | | |
1251 | 1251 | | |
1252 | 1252 | | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
1253 | 1256 | | |
1254 | 1257 | | |
1255 | 1258 | | |
| |||
1272 | 1275 | | |
1273 | 1276 | | |
1274 | 1277 | | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1275 | 1281 | | |
1276 | 1282 | | |
1277 | 1283 | | |
| |||
1288 | 1294 | | |
1289 | 1295 | | |
1290 | 1296 | | |
| 1297 | + | |
| 1298 | + | |
| 1299 | + | |
1291 | 1300 | | |
1292 | | - | |
1293 | | - | |
| 1301 | + | |
| 1302 | + | |
1294 | 1303 | | |
1295 | 1304 | | |
1296 | 1305 | | |
1297 | 1306 | | |
1298 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
1299 | 1312 | | |
1300 | 1313 | | |
1301 | 1314 | | |
| |||
1304 | 1317 | | |
1305 | 1318 | | |
1306 | 1319 | | |
| 1320 | + | |
| 1321 | + | |
1307 | 1322 | | |
1308 | 1323 | | |
1309 | 1324 | | |
| |||
Lines changed: 27 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
| 43 | + | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
69 | 93 | | |
70 | 94 | | |
71 | 95 | | |
| |||
0 commit comments