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

Automatically return gRPC errors for framework-level errors #4813

Merged
merged 17 commits into from
Jan 10, 2023

Conversation

jumaffre
Copy link
Contributor

Part of #4211

We now automatically return gRPC errors to gRPC clients that trigger a framework-level errors (e.g. authentication failure). To do so, we automatically convert the http_status to grpc_status if the request content-type is appplication/grpc.

Note that to get this to work is a smaller change than I first anticipated as we not need to link in libprotobuf as the error is simply sent back to the client in HTTP/2 trailers. However, I'm planning to link in libprotobuf to a new libccf_grpc.a library that can be linked to apps that create gRPC endpoints (future PR).

@jumaffre jumaffre requested a review from a team January 10, 2023 10:16
Copy link
Member

@MahatiC MahatiC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ghost
Copy link

ghost commented Jan 10, 2023

grpc_status_error@60112 aka 20230110.18 vs main ewma over 20 builds from 59447 to 60058

Click to see table

main

build_id build_number Commit latency factor tpcc_virtual_cft^ tpcc_sgx_cft^ tpcc_sgx_cft_mem ls_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem pi_ls_virtual_cft^ pi_ls_sgx_cft^ pi_ls_sgx_cft_mem pi_ls_jwt_virtual_cft^ ls_jwt_virtual_cft^ ls_js_virtual_cft^ ls_full_js_virtual_cft^ pi_ls_jwt_sgx_cft^ pi_ls_jwt_sgx_cft_mem ls_js_jwt_virtual_cft^ ls_jwt_sgx_cft^ 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)^
59447 20230102.3 0.799308 17240.6 6247.36 8.24484e+07 43816.5 15456.9 1.53396e+07 46963.2 15605.3 8.78598e+06 14115.7 14164.4 4551.14 3572.63 5841.3 6.95098e+06 3324.72 5891.02 1.50774e+07 1571.91 7.73741e+06 24371.1 1285.66 7.21312e+06 1299.46 6.95098e+06 840360 1.18528e+06 8.1631e+06 3.14728e+07
59462 20230103.3 0.769441 17250.5 6288.77 8.19242e+07 45839 15421.1 1.53396e+07 46662.2 15639.7 9.31027e+06 14009.1 12279.4 4646.76 3620.99 5847.6 6.68883e+06 3331.48 5822.32 1.50774e+07 1572.01 7.73741e+06 27990.6 1285.98 7.21312e+06 1295.7 6.95098e+06 837562 1.17137e+06 8.17082e+06 3.07475e+07
59477 20230103.8 0.778442 17245.4 6320.25 8.21863e+07 42006.4 15465.8 1.50774e+07 46784.3 15598.2 9.31027e+06 13230.7 12362.6 4383.37 3684.3 5817.1 6.68883e+06 3305.68 5828.86 1.50774e+07 1568.13 7.73741e+06 27481.2 1282.18 7.47526e+06 1296.68 6.95098e+06 840264 1.17885e+06 8.15355e+06 3.07933e+07
59503 20230103.14 0.807001 17176.2 6322.06 8.24484e+07 41838.3 15654.4 1.53396e+07 46279.6 15621.7 9.31027e+06 13081.9 12221.1 4529.19 3530.7 5928.6 6.68883e+06 3399.76 5844.27 1.50774e+07 1571.32 7.73741e+06 22258.1 1293.52 7.47526e+06 1297.74 6.95098e+06 835260 1.17714e+06 8.17151e+06 3.01989e+07
59552 20230103.25 0.793474 17049.5 6274.88 8.1662e+07 43539.9 15453 1.50774e+07 45301.4 15583.5 8.52384e+06 13366.6 12521.6 4665.5 3550.42 5845.5 6.68883e+06 3420.06 5841.39 1.50774e+07 1570.79 7.73741e+06 24220.9 1288.84 7.73741e+06 1300.04 6.95098e+06 838063 1.17793e+06 8.04055e+06 3.07351e+07
59578 20230103.30 0.787714 16790.8 6317.76 8.21863e+07 45826.5 15729.5 1.53396e+07 45660 15625.5 9.31027e+06 13368.6 12472.2 4653.88 3659.56 5808.9 6.68883e+06 3324.89 5816.03 1.50774e+07 1573.11 7.73741e+06 23206.6 1289.07 7.21312e+06 1301.95 6.95098e+06 843043 1.18213e+06 8.15092e+06 3.08243e+07
59588 20230104.3 0.791543 17095 6282.06 8.1662e+07 45701.8 15431.4 1.50774e+07 47455.6 15613.9 8.78598e+06 13374.6 12556.1 4670.34 3701.22 5853.7 6.68883e+06 3325.31 5852 1.48153e+07 1571.33 7.73741e+06 24152.6 1283.97 7.73741e+06 1296.71 6.95098e+06 831776 1.18216e+06 8.17317e+06 3.16059e+07
59639 20230104.19 0.793442 17099 6317.48 8.19242e+07 43700.9 15711.9 1.53396e+07 47658.5 15654 8.78598e+06 13311.4 12386.3 4631.54 3538.75 5888.9 6.95098e+06 3445.45 5834.29 1.50774e+07 1565.38 7.73741e+06 27936.5 1289.07 7.73741e+06 1297.73 6.95098e+06 825987 1.18309e+06 8.15566e+06 3.10906e+07
59665 20230105.2 0.79042 17170.6 6325.77 8.21863e+07 43827.9 15559.4 1.53396e+07 47798.4 15682.3 8.78598e+06 13342.3 14174.5 4513.65 3622.04 5861.5 6.68883e+06 3476.38 5834.47 1.50774e+07 1570.57 7.73741e+06 22620.3 1284.7 7.73741e+06 1315.74 6.95098e+06 837979 1.17992e+06 8.17323e+06 3.07162e+07
59678 20230105.6 0.79786 17180.4 6287.89 8.24484e+07 43679.2 15447.8 1.53396e+07 44918.6 15613.9 8.78598e+06 13323.5 12415.2 4590.03 3582.73 5818 6.68883e+06 3448.03 5834.47 1.50774e+07 1571.65 7.73741e+06 27185.3 1284.57 7.73741e+06 1300.41 6.95098e+06 818802 1.15908e+06 8.14269e+06 3.08531e+07
59719 20230105.16 0.816841 17292 6305.07 8.24484e+07 43799.1 15717.1 1.53396e+07 47855.8 15978.5 8.2617e+06 13712.7 12652 4681.08 3583.49 5810.9 4.59168e+06 3465.9 5800.21 1.50774e+07 1572.4 7.73741e+06 23815.7 1293.32 7.47526e+06 1309.53 6.95098e+06 832333 1.17719e+06 8.15582e+06 3.13903e+07
59747 20230105.22 0.794968 17255.8 6282.56 8.21863e+07 43731.7 15541.7 1.50774e+07 48926.1 15864.1 8.2617e+06 12965.6 12297.4 4606.8 3539.16 5731.4 4.59168e+06 3455.56 5853.15 1.4291e+07 1568 7.73741e+06 27253 1270.88 7.47526e+06 1290.39 6.95098e+06 830778 1.17671e+06 8.15459e+06 3.08021e+07
59781 20230106.3 0.766149 17131.4 6304.56 8.21863e+07 45865.6 15485.8 1.53396e+07 47560.6 15996.4 8.2617e+06 13760.5 12520 4556.31 3545.8 5767.3 4.59168e+06 3482.61 5836.68 1.50774e+07 1571.69 7.73741e+06 29148.2 1285.69 7.21312e+06 1301.23 6.95098e+06 830718 1.18073e+06 8.13347e+06 3.12057e+07
59796 20230106.7 0.761166 17319.1 6393.56 8.19242e+07 43805.5 15526.1 1.50774e+07 49223.5 15994 8.2617e+06 13222.1 14194.6 4558.98 3539.1 5776.3 4.59168e+06 3405.32 5856.54 1.50774e+07 1573.51 7.73741e+06 22169.4 1295.62 7.47526e+06 1310.43 6.95098e+06 838036 1.17707e+06 8.15342e+06 3.07106e+07
59857 20230106.21 0.824187 17277.1 5669.72 8.32349e+07 43619.5 15450.5 1.53396e+07 49466.7 15764.6 8.2617e+06 13908.8 12589.5 4670.24 3547.54 5734.8 4.59168e+06 3478.18 5829.53 1.45532e+07 1556.45 7.73741e+06 22136.6 1288.43 7.47526e+06 1286.07 6.95098e+06 834573 1.18175e+06 8.14777e+06 3.08434e+07
59868 20230106.24 0.790629 17180.8 6320.95 8.19242e+07 45688.2 15386.8 1.50774e+07 47530.3 15929.1 8.2617e+06 13969.6 12598.1 4494.25 3549.42 5683.6 4.32954e+06 3319.78 5817.54 1.50774e+07 1574.04 7.73741e+06 24101.1 1284.61 7.21312e+06 1300.25 6.95098e+06 838278 1.18118e+06 8.13463e+06 3.16206e+07
59884 20230106.28 0.795828 17323.4 6286.33 8.24484e+07 43547.6 15226.6 1.50774e+07 49261.4 15824.1 8.2617e+06 13946.8 12335 4496.59 3644.43 5691.5 4.59168e+06 3497.16 5567.66 1.48153e+07 1549.25 7.73741e+06 27214.7 1274.97 7.47526e+06 1294.91 6.95098e+06 833582 1.17879e+06 8.15352e+06 3.14975e+07
59913 20230109.3 0.801341 17030.4 6306.03 8.19242e+07 43745.9 15416.5 1.50774e+07 49415.6 15958.3 8.2617e+06 13103.9 12604.9 4577.92 3575.21 5774.8 4.59168e+06 3419.69 5792.56 1.48153e+07 1576.66 7.73741e+06 22710.6 1284.27 7.21312e+06 1294.81 6.95098e+06 831861 1.17817e+06 8.13638e+06 3.10176e+07
59965 20230109.15 0.780423 17207.7 6324.3 8.21863e+07 45587.6 15694.6 1.50774e+07 48721.1 15977.1 8.2617e+06 13982.3 14053 4691.8 3651.59 5780.6 4.59168e+06 3447.26 5818.76 1.50774e+07 1569.53 7.73741e+06 27856.7 1288.17 7.21312e+06 1309.81 6.95098e+06 835622 1.17871e+06 8.15426e+06 3.07291e+07
60058 20230110.2 0.7761 17177 6398.3 8.24484e+07 45887.3 15764.4 1.53396e+07 47185 15979.8 8.2617e+06 14027.2 12793.6 4427.6 3553.85 5811.5 4.59168e+06 3323.97 5893.84 1.4291e+07 1572.98 7.73741e+06 28237.9 1285.54 7.21312e+06 1307.16 6.95098e+06 840375 1.17776e+06 8.17301e+06 3.09067e+07

grpc_status_error

build_id build_number Commit latency factor tpcc_virtual_cft^ ls_virtual_cft^ tpcc_sgx_cft^ tpcc_sgx_cft_mem pi_ls_virtual_cft^ ls_jwt_virtual_cft^ pi_ls_jwt_virtual_cft^ ls_js_virtual_cft^ ls_sgx_cft^ ls_sgx_cft_mem pi_ls_sgx_cft^ pi_ls_sgx_cft_mem ls_full_js_virtual_cft^ ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_jwt_virtual_cft^ 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)^
60071 20230110.7 0.794293 17149 43948.3 6282.79 8.19242e+07 46991.6 12476.2 13166 4393.44 15497.5 1.50774e+07 15937.1 8.2617e+06 3461.87 5863.63 1.48153e+07 3322.1 5779.8 4.59168e+06 1570.28 7.73741e+06 27624.2 1283.97 7.73741e+06 1294.21 6.95098e+06 831857 1.17492e+06 8.1554e+06 3.21927e+07
60098 20230110.14 0.806672 17129.3 45807 6354.54 8.19242e+07 46787.8 12226.2 13100.2 4461.34 15550.9 1.53396e+07 15943.3 8.2617e+06 3610.31 5846.83 1.4291e+07 3335.87 5709.5 4.59168e+06 1570.32 7.73741e+06 22392.3 1283.09 7.73741e+06 1286.72 6.95098e+06 834615 1.18224e+06 8.15556e+06 3.06862e+07
60112 20230110.18 0.802307 17307.7 43435.1 6258.36 8.21863e+07 49016.5 12417 14078.5 4415.88 15599.2 1.50774e+07 15952.1 8.2617e+06 3580.58 5864.43 1.50774e+07 3395.06 5771.8 4.59168e+06 1570.79 7.99955e+06 23301.6 1288.69 7.21312e+06 1280.92 6.95098e+06 824730 1.17833e+06 8.15316e+06 3.0644e+07

images

@jumaffre jumaffre mentioned this pull request Jan 10, 2023
3 tasks
@jumaffre jumaffre merged commit 5e0d4f3 into microsoft:main Jan 10, 2023
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.

3 participants