Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask ruff to autofix Python lint errors, where possible #5903

Merged
merged 4 commits into from
Jan 10, 2024

Conversation

eddyashton
Copy link
Member

For some errors that ruff spots, such as unused includes, it will print an error along the lines of "I could have tried to fix this automatically, if you'd given me the --fix arg". It's odd-to-annoying ifthat appears when we have passed the -f[ix] arg to our ci-checks wrapper!

So the wrapper's fix mode now enables ruff's fix mode, as it does with similar tools.

Also, because we have mixed verbosity of the tools called from this wrapper, I've modified it to always print group headings. There might be a reason this was disabled, that I've forgotten? But I think it makes the output far more readable.

@eddyashton eddyashton requested a review from a team January 9, 2024 16:31
@achamayou
Copy link
Member

Also, because we have mixed verbosity of the tools called from this wrapper, I've modified it to always print group headings. There might be a reason this was disabled, that I've forgotten? But I think it makes the output far more readable.

I don't think there was a reason, I think there were no group headings at first, then someone added them just for CI but didn't want to make the regular output more verbose. The script only did clang-format and pylint at first, with very minimal output, but has grown to call a whole bunch of things, so I agree that having the headings now makes a lot of sense.

@ghost
Copy link

ghost commented Jan 9, 2024

ci_checks_fix_ruff@80111 aka 20240110.6 vs main ewma over 20 builds from 79836 to 80102

Click to see table

main

build_id build_number pi_basic_mt_sgx_cft^ pi_basic_mt_sgx_cft_mem Commit latency factor tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_sgx_cft^ ls_sgx_cft_mem pi_ls_sgx_cft^ pi_ls_sgx_cft_mem pi_basic_sgx_cft^ pi_basic_sgx_cft_mem pi_basic_js_sgx_cft^ pi_basic_js_sgx_cft_mem pi_basic_mt_virtual_cft^ tpcc_virtual_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem tlc_3node_fixed_duration_s tlc_3node_fixed_states ls_virtual_cft^ tlc_atomic_reconfig_duration_s tlc_atomic_reconfig_states tlc_reconfig_duration_s tlc_reconfig_states pi_ls_virtual_cft^ ls_js_sgx_cft^ ls_js_sgx_cft_mem pi_basic_virtual_cft^ ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem pi_basic_js_virtual_cft^ ls_jwt_virtual_cft^ pi_ls_jwt_virtual_cft^ ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem ls_js_virtual_cft^ ls_full_js_virtual_cft^ ls_js_jwt_virtual_cft^ hist_sgx_cft^ RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^ tlc_sim_traces tlc_sim_levelmean
79836 20240103.1 28173 2.51822e+07 0.8277 5617.23 8.59996e+07 14088.9 1.88908e+07 14246.2 1.05021e+07 15684.4 1.46964e+07 1430.6 1.25993e+07 68113.2 17163.7 7262.76 1.67936e+07 6980.2 6.30784e+06 6 86496 52985.4 417 1.2541e+07 238 6.31473e+06 57238.7 5814.99 1.67936e+07 62511.8 5465.89 1.88908e+07 4622.6 20776.5 21693.9 3973.9 1.67936e+07 20385 17974.8 11889.2 43365.4 827987 1.18005e+06 8.16857e+06 3.13533e+07 2109 403
79850 20240104.1 28107.5 2.51822e+07 0.774183 5647.78 8.59996e+07 14069.1 1.88908e+07 14203.3 1.05021e+07 15616.9 1.25993e+07 1430.7 1.25993e+07 88847.3 17222.5 7263.29 1.67936e+07 7142 6.30784e+06 6 86496 53076.9 447 1.2541e+07 239 6.31473e+06 56886.7 5808.21 1.67936e+07 62583 5739.03 1.88908e+07 4618.3 20820.4 21956.8 4019.28 1.67936e+07 17246.1 17545.1 11727 45361.8 833007 1.17531e+06 8.1401e+06 3.07056e+07 2277 403
79858 20240104.5 28151.4 2.30851e+07 0.762951 5612.73 8.59996e+07 14105.1 1.88908e+07 14237.6 1.05021e+07 15657.2 1.46964e+07 1437 1.05021e+07 72092.6 17237.2 7259.07 1.88908e+07 6983.6 6.30784e+06 6 86496 53156.1 420 1.2541e+07 238 6.31473e+06 56700.3 5791.47 1.67936e+07 62251.6 5734.66 1.67936e+07 4624.7 20802.9 22305.5 4001.19 1.67936e+07 17912 17600.9 12005.6 46312.7 832473 1.18246e+06 8.14589e+06 3.0464e+07 2357 403
79876 20240104.10 27983.2 2.51822e+07 0.770841 5617.52 8.59996e+07 14034.5 1.67936e+07 14165.8 1.05021e+07 15592.9 1.25993e+07 1427.3 1.25993e+07 82253.2 17196.9 7241.98 1.67936e+07 6915.4 6.30784e+06 6 86496 53164.5 429 1.2541e+07 234 6.31473e+06 56410.8 5771.22 1.67936e+07 62397 5737.28 1.67936e+07 4645.9 20949.8 22178.9 3985.63 1.67936e+07 17324.7 17551.5 11659.7 40222.9 829045 1.18083e+06 8.15014e+06 3.10298e+07 2315 403
79893 20240105.3 28242.6 2.30851e+07 0.770387 5619.63 8.59996e+07 14091.5 1.88908e+07 14247.6 1.05021e+07 15674.3 1.25993e+07 1436.8 1.25993e+07 79459.2 17195.7 7241.21 1.67936e+07 7028.1 6.30784e+06 6 86496 53109.3 438 1.2541e+07 234 6.31473e+06 56423.9 5776.46 1.67936e+07 61913.6 5739.53 1.67936e+07 4637.7 21053.6 21897.2 4001.54 1.67936e+07 17479.2 17489.6 11786.3 41192.1 834184 1.18333e+06 8.13454e+06 3.07928e+07 2312 403
79901 20240105.6 28134.7 2.51822e+07 0.804442 5625.32 8.59996e+07 14099 1.88908e+07 14266.8 1.05021e+07 15657.8 1.46964e+07 1428.6 1.25993e+07 96416.1 17253.5 6896.08 1.67936e+07 7033.2 6.30784e+06 6 86496 52754.9 445 1.2541e+07 240 6.31473e+06 54886.9 5807.41 1.67936e+07 61431.1 5744.67 1.88908e+07 4615.1 20971.5 21889.5 4003.65 1.67936e+07 17410.2 17219.9 11532.7 42166 837682 1.17356e+06 8.14881e+06 3.18111e+07 2258 403
79920 20240105.14 28090.3 2.51822e+07 0.804667 5642.82 8.59996e+07 14097.8 1.88908e+07 14249.7 1.05021e+07 15643 1.46964e+07 1426.1 1.25993e+07 72389.5 17195.4 6883.92 1.88908e+07 6976.3 6.30784e+06 6 86496 53484.4 434 1.2541e+07 235 6.31473e+06 56927.5 5819.57 1.67936e+07 63034.1 5767.4 1.67936e+07 4635.9 20600.9 21708 3983.21 1.67936e+07 20208.9 17600.9 11868.5 42864.9 816929 1.18007e+06 8.14615e+06 3.06564e+07 2325 403
79931 20240105.18 28155.9 2.51822e+07 0.830304 5572.38 8.59996e+07 14067.9 1.67936e+07 14143.9 1.05021e+07 15609.5 1.25993e+07 1433 1.25993e+07 78451.8 17203.8 6844.24 1.67936e+07 6937.8 6.30784e+06 6 86496 53081 436 1.2541e+07 236 6.31473e+06 57491.7 5775.62 1.67936e+07 63657.6 5454.13 1.67936e+07 4644.3 20979.1 21753.3 3990.64 1.67936e+07 20837.9 17426.7 11781.2 41115.6 835630 1.17185e+06 8.15319e+06 3.14385e+07 2224 403
79937 20240105.20 28053.5 2.51822e+07 0.788583 5577.35 8.59996e+07 14052.4 1.88908e+07 14109.9 1.05021e+07 15547.2 1.46964e+07 1435.2 1.25993e+07 85420.8 17208.8 7233.07 1.67936e+07 6844.1 6.30784e+06 6 77678 56022.5 366 1.14441e+07 223 5.86578e+06 56925.6 5802.33 1.67936e+07 63903.6 5491.67 1.67936e+07 4666.7 20742.8 21552.2 3998.46 1.67936e+07 20961.9 17614 11908.4 47083.7 832419 1.18053e+06 8.15387e+06 3.21896e+07 2256 403
79954 20240108.2 28237 2.30851e+07 0.811783 5591.06 8.59996e+07 14064.6 1.88908e+07 14197.4 1.05021e+07 15540.4 1.46964e+07 1431.6 1.25993e+07 99047.8 17316.8 7263.29 1.67936e+07 7083.5 6.30784e+06 6 77678 53076.6 393 1.14441e+07 225 5.86578e+06 55248.3 5819.68 1.67936e+07 60320.6 5772.06 1.67936e+07 4528.2 20993.9 21334.7 4006.27 1.67936e+07 17858.4 17621.1 11538.3 41219.2 823934 1.18456e+06 8.13305e+06 3.08225e+07 2191 403
79961 20240108.5 27925.4 2.51822e+07 0.812651 5643.13 8.59996e+07 14080.8 1.67936e+07 14230.5 1.05021e+07 15627.5 1.25993e+07 1428.6 1.25993e+07 85416 17247.2 7265.93 1.67936e+07 6978.2 6.30784e+06 5 77678 53409.5 377 1.14441e+07 219 5.86578e+06 56958 5819.84 1.67936e+07 63490.4 5491.66 1.88908e+07 4632.7 20797.7 22702.5 3978.52 1.67936e+07 20869.2 17815.9 11888.8 43913.1 834677 1.17721e+06 8.13573e+06 3.1303e+07 2280 403
79989 20240108.17 28271 2.51822e+07 0.812918 5581.25 8.59996e+07 14031.6 1.67936e+07 14136.4 1.05021e+07 15523.6 1.46964e+07 1415.9 1.25993e+07 78403.9 17262.7 7249.22 1.67936e+07 6933.6 6.30784e+06 6 77678 52887.3 392 1.14441e+07 220 5.87421e+06 55918.4 5811.81 1.67936e+07 62745.3 5488.58 1.67936e+07 4610.5 20923.3 22286.1 3984.32 1.67936e+07 20921.3 17621.5 11740.7 45321.3 831008 1.18097e+06 8.15374e+06 3.08415e+07 2380 403
80001 20240108.22 28214.4 2.30851e+07 0.786976 5635.92 8.59996e+07 14107 1.67936e+07 14229 1.05021e+07 15650.3 1.25993e+07 1429.2 1.05021e+07 82485.2 17220.1 7261.71 1.67936e+07 7084.9 6.30784e+06 6 77678 52740.1 147 3.90715e+06 144 3.83177e+06 56590.9 5822.41 1.67936e+07 62501.5 5738.66 1.67936e+07 4637.4 20710.5 21594.5 3986.1 1.67936e+07 20773 17397.2 11679.9 45877 835642 1.18258e+06 8.17072e+06 3.06881e+07 2749 403
80019 20240109.2 27799.4 2.51822e+07 0.779573 5541.95 8.59996e+07 13996.1 1.88908e+07 14114.4 1.05021e+07 15421.9 1.25993e+07 1423.3 1.25993e+07 92062.2 17676.2 6843.67 1.67936e+07 6964.2 6.30784e+06 5 77678 53244.4 150 3.90715e+06 149 3.83177e+06 56053.5 5808.73 1.67936e+07 61572.3 5734.06 1.67936e+07 4586.7 20734.2 22425.5 4019.09 1.67936e+07 17371.7 17383.5 11766.6 40846.9 840733 1.17962e+06 8.12931e+06 3.06812e+07 2587 403
80028 20240109.6 28077.7 2.51822e+07 0.773671 5668.81 8.59996e+07 14080.8 1.88908e+07 14176.2 1.05021e+07 15684.6 1.46964e+07 1435.3 1.25993e+07 80572.2 17211.9 6914.02 1.88908e+07 7048.5 6.30784e+06 5 77678 53026.8 150 3.90715e+06 146 3.83177e+06 58109.1 5802.22 1.67936e+07 61402.2 5766.41 1.67936e+07 4691.4 20760.8 22245 3999.26 1.67936e+07 20537.9 17634 11758.4 43293 830215 1.18604e+06 8.15176e+06 3.07125e+07 2686 403
80038 20240109.10 27757.8 2.30851e+07 0.804995 5590.07 8.59996e+07 14106.5 1.88908e+07 14170.6 1.05021e+07 15627.6 1.25993e+07 1424.9 1.25993e+07 82244.9 17787.8 6806.45 1.67936e+07 7055.6 6.30784e+06 6 77678 52786.7 148 3.90715e+06 149 3.83177e+06 56588 5772.08 1.67936e+07 62017.1 5731.73 1.67936e+07 4618.3 21127.5 22348.4 3997.66 1.67936e+07 20872.7 17348.9 11716.9 46610.2 793924 1.17586e+06 8.15647e+06 3.07947e+07 2762 403
80055 20240109.17 28125.3 2.51822e+07 0.801944 5553.42 8.59996e+07 14011.9 1.88908e+07 14117.8 1.05021e+07 15653.4 1.25993e+07 1440.5 1.25993e+07 83110 17168 6840.17 1.88908e+07 6906.2 6.30784e+06 6 77678 53353.8 150 3.90715e+06 150 3.83177e+06 56983.3 5773.25 1.67936e+07 62914.7 5487.83 1.88908e+07 4671.7 20784.1 21676.9 3992.89 1.67936e+07 20551.7 17667.4 11750.6 45493 839102 1.17961e+06 8.13667e+06 3.07457e+07 2683 403
80085 20240109.28 27914.1 2.30851e+07 0.831407 5607.34 8.59996e+07 14092.1 1.88908e+07 14218.4 1.05021e+07 15591 1.46964e+07 1436.1 1.25993e+07 84552.9 17271.2 7203.24 1.67936e+07 6930.4 6.30784e+06 6 77678 52847 205 5.77852e+06 186 5.0742e+06 55766.8 5772.46 1.67936e+07 60387.5 5465.32 1.67936e+07 4518.1 21205.6 21748.6 3986.53 1.67936e+07 20441.1 17266.4 11745.2 45314.9 831761 1.18499e+06 8.16636e+06 3.08248e+07 3690 403
80094 20240109.31 28085.6 2.51822e+07 0.804231 5573.1 8.59996e+07 14090.2 1.88908e+07 14222.7 1.05021e+07 15634.2 1.46964e+07 1430.5 1.25993e+07 87281.9 17297.9 7275.45 1.67936e+07 6924.1 6.30784e+06 6 77678 53433.6 209 5.77852e+06 189 5.0742e+06 56694.8 5816.35 1.67936e+07 62608 5769.73 1.67936e+07 4662.9 20736 22087.2 3988.35 1.67936e+07 20693.3 17701.3 11733.9 43765.3 836503 1.18123e+06 8.12931e+06 3.10449e+07 3819 403
80102 20240110.3 28155.1 2.30851e+07 0.780749 5572.82 8.59996e+07 14058.8 1.88908e+07 14134.6 1.05021e+07 15597.1 1.25993e+07 1434.7 1.25993e+07 83443.5 17241.8 6839.89 1.67936e+07 7044.8 6.30784e+06 5 77678 55991.4 208 5.77852e+06 187 5.0742e+06 56950.9 5808.17 1.67936e+07 62643.7 5770.73 1.67936e+07 4672.3 20523.6 22367.9 4010.45 1.67936e+07 21053.3 17212.3 11742.4 38972.7 835272 1.18135e+06 8.14959e+06 3.05868e+07 3518 403

ci_checks_fix_ruff

build_id build_number tlc_3node_fixed_duration_s tlc_3node_fixed_states tlc_atomic_reconfig_duration_s tlc_atomic_reconfig_states tlc_reconfig_duration_s tlc_reconfig_states pi_basic_mt_sgx_cft^ pi_basic_mt_sgx_cft_mem Commit latency factor pi_basic_mt_virtual_cft^ tpcc_sgx_cft^ tpcc_sgx_cft_mem tpcc_virtual_cft^ ls_virtual_cft^ pi_ls_virtual_cft^ pi_basic_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem pi_basic_js_virtual_cft^ pi_ls_sgx_cft^ pi_ls_sgx_cft_mem ls_jwt_virtual_cft^ pi_basic_sgx_cft^ pi_basic_sgx_cft_mem pi_ls_jwt_virtual_cft^ ls_js_virtual_cft^ ls_full_js_virtual_cft^ ls_js_jwt_virtual_cft^ pi_basic_js_sgx_cft^ pi_basic_js_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem hist_sgx_cft^ ls_full_js_sgx_cft^ ls_full_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem RB put (/s)^ CHAMP put (/s)^ RB get (/s)^ CHAMP get (/s)^ tlc_sim_traces tlc_sim_levelmean
80080 20240109.25 5 77678 145 3.90715e+06 145 3.83177e+06 28026.9 2.51822e+07 0.803387 86418.9 5617.89 8.59996e+07 17240.3 53082.3 56636 62237.7 14079.4 1.88908e+07 4677 14143.7 1.05021e+07 20201.6 15643.7 1.25993e+07 22265.8 20474.3 17780.2 11733.7 1430.2 1.25993e+07 6850.43 1.67936e+07 6985.7 6.30784e+06 5812.24 1.67936e+07 45575.3 5770.4 1.67936e+07 3999.49 1.67936e+07 835383 1.18343e+06 8.14641e+06 3.08569e+07 2590 403
80092 20240109.30 5 77678 207 5.77852e+06 187 5.0742e+06 28051.2 2.30851e+07 0.783005 67609.7 5613.05 8.59996e+07 17297.6 56085.9 56959.6 62919.8 14088.4 1.67936e+07 4654.8 14202.2 1.05021e+07 21010.3 15589.7 1.46964e+07 22216.3 20479.4 17594.2 11757.5 1436.1 1.25993e+07 7201.5 1.67936e+07 7057.6 6.30784e+06 5808 1.67936e+07 45139.3 5745.06 1.88908e+07 4001.76 1.67936e+07 828598 1.18454e+06 8.15316e+06 3.07083e+07 3624 403
80111 20240110.6 6 77678 205 5.77852e+06 192 5.0742e+06 28168.4 2.51822e+07 0.840948 97372.9 5634.03 8.59996e+07 17162.2 53089.8 57054.2 62800.9 14091.7 1.88908e+07 4686.7 14230.1 1.05021e+07 20363.6 15647.2 1.25993e+07 22243.5 21014.9 17656.2 11717.6 1437.3 1.25993e+07 7246.45 1.67936e+07 7089 6.30784e+06 5811.61 1.67936e+07 47379.3 5746.03 1.67936e+07 4005.86 1.67936e+07 832297 1.17739e+06 8.14952e+06 3.1043e+07 3670 403

images

@eddyashton eddyashton merged commit 11c2737 into microsoft:main Jan 10, 2024
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants