material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[docs-infra] Migrate AWS SDK for JavaScript v2 APIs to v3

Open trivikr opened this issue 2 years ago • 7 comments

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}}

trivikr avatar Nov 02 '23 16:11 trivikr

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

mui-bot avatar Nov 02 '23 16:11 mui-bot

Screenshot 2023-11-08 at 2 27 38 PM

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 🙏

mj12albert avatar Nov 08 '23 06:11 mj12albert

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

alexfauquette avatar Nov 08 '23 11:11 alexfauquette

@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.

oliviertassinari avatar Dec 24 '23 15:12 oliviertassinari

@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.

trivikr avatar Feb 19 '24 14:02 trivikr

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

trivikr avatar Mar 11 '24 16:03 trivikr

@mui/docs-infra Could somebody review this PR further?

ZeeshanTamboli avatar Jul 19 '24 16:07 ZeeshanTamboli