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

Forum sample rework #2455

Merged
merged 29 commits into from
Apr 14, 2021
Merged

Conversation

letmaik
Copy link
Member

@letmaik letmaik commented Apr 12, 2021

  • Move business logic out of controllers into services to allow unit testing / debugging outside CCF using ccf-app polyfills.
  • Move demo scripts to separate folder away from tests.
  • Remove esm dependency in favour of native ESM support in Node.js.
  • Fix auth header in demo script demo/submit-opinions.ts which isn't tested in CI and missed a fix that was already applied to the unit tests earlier.
  • Fix display of errors in app website.
  • Exclude mathjs 9.3.1 due to a packaging bug.
  • Remove selfsigned dependency in favour of using node-forge directly.
  • Update to latest tsoa version and remove redundant (empty) entry script.
  • Some better error logging during debugging.
  • Extended docs.

@letmaik letmaik requested a review from a team as a code owner April 12, 2021 10:45
@ghost
Copy link

ghost commented Apr 12, 2021

letmaik/forum-unit-tests@23456 aka 20210414.15 vs main ewma over 20 builds from 23079 to 23450

Click to see table
build_id build_number sb_sgx_cft^ sb_sgx_cft_mem sb_sgx_bft^ sb_sgx_bft_mem sb_ws_sgx_cft^ sb_ws_sgx_cft_mem sb_sig_sgx_cft^ sb_sig_sgx_cft_mem tpcc_sgx_cft^ tpcc_sgx_cft_mem tpcc_sgx_bft^ tpcc_sgx_bft_mem ls_sgx_cft^ ls_sgx_cft_mem ls_ws_sgx_cft^ ls_ws_sgx_cft_mem ls_jwt_sgx_cft^ ls_jwt_sgx_cft_mem ls_js_sgx_cft^ ls_js_sgx_cft_mem ls_js_jwt_sgx_cft^ ls_js_jwt_sgx_cft_mem CHAMP put (/s)^ CHAMP get (/s)^
23079 20210408.25 27847.3 1.2456e+07 14288 3.68354e+07 31087.8 1.27181e+07 4866.98 1.03588e+07 6578.06 8.50699e+07 3228.6 1.9019e+08 25983.1 1.71746e+07 28739.5 1.71746e+07 4003.31 1.4291e+07 1974.56 9.04813e+06 1433.32 7.73741e+06 1.3211e+06 3.61193e+07
23094 20210409.1 26993 1.21939e+07 14504.1 3.99811e+07 33739.2 1.29803e+07 4963.63 1.00967e+07 6700.18 8.50699e+07 3385.08 1.68694e+08 23941.4 1.69124e+07 30881.9 1.74367e+07 3825.47 1.40289e+07 1968.98 8.78598e+06 1427.8 8.2617e+06 1.3627e+06 3.5993e+07
23107 20210409.5 26984 1.2456e+07 15451.5 3.68354e+07 32370.8 1.27181e+07 5417.27 1.03588e+07 6572.9 8.50699e+07 3163.35 2.27152e+08 23913.3 1.69124e+07 32587.3 1.74367e+07 4223.19 1.4291e+07 1999.3 9.04813e+06 1504.13 7.47526e+06 1.32779e+06 3.61193e+07
23117 20210409.8 25904.1 1.21939e+07 14215.2 3.89325e+07 30392.5 1.29803e+07 4922.96 1.0621e+07 6551.68 8.48077e+07 2788.25 2.53366e+08 25015.3 1.71746e+07 30914 1.74367e+07 3853.23 1.40289e+07 2003.12 8.78598e+06 1463.83 7.73741e+06 1.33376e+06 3.62478e+07
23154 20210409.20 25455.3 1.2456e+07 14108.8 3.7884e+07 33597.4 1.29803e+07 4926.18 1.0621e+07 6639.66 8.5332e+07 3302.32 1.58208e+08 23577.4 1.7961e+07 31825 1.76989e+07 4019.73 1.4291e+07 2096.98 9.04813e+06 1441.42 7.99955e+06 1.3561e+06 3.63121e+07
23184 20210412.1 26532.9 1.27181e+07 14780.4 3.76218e+07 31976.2 1.27181e+07 4974.16 1.0621e+07 6596.69 8.58563e+07 3167.78 1.93335e+08 24313.6 1.71746e+07 31434.5 1.9796e+07 4196.96 1.45532e+07 2095.93 9.04813e+06 1395.1 7.99955e+06 1.32935e+06 3.65062e+07
23191 20210412.4 28168.2 1.21939e+07 13578.1 3.81461e+07 31048.7 1.27181e+07 5390.42 1.03588e+07 6693.37 8.50699e+07 3244.67 1.88879e+08 22873 1.76989e+07 31199.8 1.74367e+07 3656.45 1.40289e+07 1989.73 1.11453e+07 1408.86 9.31027e+06 1.3404e+06 3.62478e+07
23228 20210412.16 27094.5 1.2456e+07 14158 3.86704e+07 32506.2 1.29803e+07 4962.35 1.0621e+07 6724.78 8.5332e+07 3371.49 1.80752e+08 23486.6 1.69124e+07 31683.6 1.74367e+07 4059.8 1.48153e+07 2087.88 9.04813e+06 1465.14 7.99955e+06 1.34365e+06 3.58042e+07
23274 20210412.31 25939.2 1.2456e+07 15381.3 3.76218e+07 34876.6 1.27181e+07 4882.44 1.16696e+07 6475.3 8.40213e+07 3489.43 1.53227e+08 24076.5 1.69124e+07 30935.1 1.74367e+07 4201.1 1.53396e+07 2063.54 9.04813e+06 1409.9 8.2617e+06 1.32883e+06 3.58663e+07
23287 20210412.35 26181 1.19317e+07 15279.3 3.76218e+07 30442.5 1.27181e+07 4775.29 1.08831e+07 6243.42 8.37592e+07 3311.97 1.6581e+08 22556.2 1.71746e+07 30038.6 1.7961e+07 4179.6 1.4291e+07 2004.41 1.27181e+07 1398.76 1.00967e+07 1.34392e+06 3.53103e+07
23299 20210412.38 22458.5 1.21939e+07 14469 3.63111e+07 30947.7 1.32424e+07 4930.26 1.03588e+07 6645.11 8.50699e+07 2388.55 2.38424e+08 25354.5 1.71746e+07 30372.8 1.74367e+07 3931.02 1.45532e+07 2011.02 1.08831e+07 1452.91 9.83456e+06 1.3218e+06 3.54939e+07
23307 20210412.41 26681.9 1.21939e+07 14783.9 3.86704e+07 30591.8 1.2456e+07 4886.43 1.0621e+07 6590.81 8.45456e+07 3409.34 1.47722e+08 24744.1 1.76989e+07 31152 1.76989e+07 3734.74 1.37667e+07 2017.69 1.0621e+07 1392.95 8.2617e+06 1.32685e+06 3.59298e+07
23320 20210412.45 25555.7 1.21939e+07 13714.9 3.81461e+07 30542 1.27181e+07 4903.2 1.00967e+07 6234.66 8.40213e+07 3308.84 1.51654e+08 25564.5 1.71746e+07 27664.5 1.69124e+07 4277.3 1.48153e+07 1982.36 8.78598e+06 1412.9 7.73741e+06 1.31959e+06 3.60563e+07
23336 20210413.1 22699.4 1.19317e+07 15507.9 3.9719e+07 29730.3 1.2456e+07 4421.8 1.0621e+07 6756.09 8.5332e+07 2975.59 2.01462e+08 25559.6 1.90096e+07 30329.6 1.74367e+07 4497.1 1.48153e+07 2016.36 8.52384e+06 1385 7.99955e+06 1.33619e+06 3.58663e+07
23356 20210413.7 23909.7 1.21939e+07 15301.3 3.81461e+07 33003.5 1.29803e+07 4948.33 1.00967e+07 6263.56 8.63806e+07 3321.4 1.60567e+08 23392.4 1.90096e+07 29546.1 1.90096e+07 4014.97 1.45532e+07 1946.79 9.04813e+06 1393 7.99955e+06 1.33776e+06 3.5993e+07
23376 20210413.13 29456.3 1.27181e+07 14823.7 4.05054e+07 30940.7 1.27181e+07 5013.36 1.03588e+07 5941.37 8.48077e+07 3318.1 1.5847e+08 22474.5 1.69124e+07 29110.5 1.92717e+07 4004.52 1.4291e+07 1991.84 9.04813e+06 1418.55 7.99955e+06 1.3478e+06 3.59292e+07
23388 20210413.16 27293 1.2456e+07 14985.8 4.02433e+07 34667.5 1.35046e+07 4837.11 1.00967e+07 6516.81 8.48077e+07 3341.52 1.65286e+08 23982.2 1.87475e+07 29694.4 1.92717e+07 4221.58 1.48153e+07 2014.06 1.08831e+07 1434.31 7.99955e+06 1.33837e+06 3.62478e+07
23411 20210414.1 30027.4 1.2456e+07 15645.2 3.91947e+07 33723.8 1.29803e+07 4963.12 1.03588e+07 7038.48 8.61185e+07 3463.63 1.61092e+08 22326.7 1.76989e+07 30749 1.90096e+07 4007.02 1.45532e+07 2053.8 8.52384e+06 1478.56 7.99955e+06 1.3028e+06 3.54939e+07
23440 20210414.11 26098.6 1.21939e+07 14812.8 3.84083e+07 32652.4 1.32424e+07 4974.45 1.03588e+07 6674.19 8.42835e+07 3412.07 1.85471e+08 24559.8 1.87475e+07 28598.7 1.87475e+07 3950.48 1.45532e+07 1990.44 1.27181e+07 1473.42 7.99955e+06 1.34286e+06 3.62478e+07
23450 20210414.14 27251.9 1.2456e+07 14750.6 3.9719e+07 34874.5 1.29803e+07 4962.61 1.03588e+07 6805.11 8.50699e+07 3052.66 2.03559e+08 25147.4 1.82232e+07 28933.3 1.90096e+07 3853.71 1.45532e+07 2032.49 1.19317e+07 1417.3 7.99955e+06 1.35021e+06 3.61837e+07

images

@letmaik
Copy link
Member Author

letmaik commented Apr 13, 2021

CI failure is unrelated.

@@ -41,10 +41,13 @@ The sample app has the following folder layout:
│ │ └── site.ts
│ ├── models
│ │ └── poll.ts
│ ├── services
Copy link
Contributor

Choose a reason for hiding this comment

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

Are CCF/enclave apps called services? If not, I would suggest to change services into e.g. enclaveApp. Services is confusing.

Copy link
Member Author

Choose a reason for hiding this comment

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

This term comes from tsoa's docs: https://tsoa-community.github.io/docs/getting-started.html#defining-our-first-model. I've seen this before outside tsoa, another term would be *Manager but I'd like to stick to tsoa's docs here. The whole npm app runs inside CCF, not just the services.


Generate opinions, user identities and submit:
Copy link
Contributor

Choose a reason for hiding this comment

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

These edits are really a great addition

@achamayou achamayou merged commit 7455dd8 into microsoft:main Apr 14, 2021
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