[docs-infra] Migrate AWS SDK for JavaScript v2 APIs to v3
Closes https://github.com/mui/material-ui/issues/43453
Issue
From AWS SDK for JavaScript v2 README:
We are formalizing our plans to make the Maintenance Announcement (Phase 2) for AWS SDK for JavaScript v2 in 2023.
Description
This PR migrates AWS SDK for JavaScript v2 APIs to v3 using aws-sdk-js-codemod.
$ npx [email protected] -t v2-to-v3 packages/feedback/*.js
Testing
Create new feedback:
$ curl -H "Content-Type: application/json" -X POST --data @example.json <API-URL>/feedback
{"id":"6fc61f43-3ffc-43bc-9cbc-be307cbc7d3f","page":"/material-ui/react-card","rating":5,"comment":"Yay!","version":"5.0.0","language":"en","dateTime":"Thu Nov 02 2023 16:53:51 GMT+0000 (Coordinated Universal Time)"}
Retrieve feedback:
$ curl <API-URL>/feedback/6fc61f43-3ffc-43bc-9cbc-be307cbc7d3f
{"/material-ui/react-card":{"rating":5,"comment":"Yay!"}}
Retrieve average ratings:
$ curl <API-URL>/feedback/average
{"/material-ui/react-card":{"rating":5,"count":2}}
- [x] I have followed (at least) the PR section of the contributing guide.
Netlify deploy preview
https://deploy-preview-39723--material-ui.netlify.app/
Bundle size report
No bundle size changes (Toolpad) No bundle size changes
Generated by :no_entry_sign: dangerJS against e75045d8d6830e15b99d1894d6790c428da6d451
I've tested the feedback API and it works: https://mui-org.slack.com/archives/C041SDSF32L/p1699424819237739
Though I'm not sure if it covers everything (updateAverageRating?) – CC @mui/docs-infra for a review 🙏
That function is not related to the Slack feedback pipeline which is handled in Netlify.
@oliviertassinari Do you have usecase for it? It feels like we throw data into a database that nobody reads
@oliviertassinari Do you have a case for it? It feels like we throw data into a database that nobody reads
@alexfauquette: @DiegoAndai recently asked me for access to the dyno that stores these answers. I wouldn't be against having an SQL like database who stores the ratings and comments, on which, we could create reports with Metabase.
@alexfauquette @oliviertassinari Is there anything blocking review and/or merging of this PR?
I've rebase the changes from last 3+ months. The JS SDK v3 is bumped to the latest version, and I've switched this PR to use pnpm.
AWS SDK for JavaScript v2 will enter maintenance mode on September 8, 2024 and reach end-of-support on September 8, 2025.
For more information, check blog post at https://a.co/cUPnyil
@mui/docs-infra Could somebody review this PR further?