[go: up one dir, main page]

Page MenuHomePhabricator

Validate requests in chart-renderer service
Open, HighPublic3 Estimated Story Points

Description

The chart-renderer service accepts a JSON blob that it expects to follow a certain format, but it doesn't currently validate this. We should validate this input, perhaps using the express-validator NPM package.

Acceptance Criteria
  • Requests made to the chart-renderer service are validated (using the schema definition from T372307)
  • Requests that fail validation are logged
  • The decision around which library we are using has been recorded in the codebase as a decision record. The decision record should capture why we choose Zod for validation as opposed to "just" TypeScript, and other libraries we considered and rejedcted.

Event Timeline

https://zod.dev/ could be useful for validation in the service

CCiufo-WMF triaged this task as Medium priority.Mon, Aug 26, 6:28 PM
CCiufo-WMF updated the task description. (Show Details)
CCiufo-WMF set the point value for this task to 3.
CCiufo-WMF moved this task from Needs Triage to Estimated on the Charts board.
CCiufo-WMF edited projects, added Charts (Sprint 5); removed Charts.
CCiufo-WMF moved this task from Incoming to Ready for Dev on the Charts (Sprint 5) board.
Jdlrobson subscribed.

Following our discussion today I added an acceptance criteria about capturing our decision to use Zod. Let me know if you have any concerns about doing that as part of this ticket! We'll backfill other decisions as part of T374065.

CCiufo-WMF moved this task from Sprint 5 to Estimated on the Charts board.
CCiufo-WMF edited projects, added Charts; removed Charts (Sprint 5).
CCiufo-WMF raised the priority of this task from Medium to High.Mon, Sep 9, 6:30 PM
CCiufo-WMF moved this task from Estimated to Sprint 6 on the Charts board.
CCiufo-WMF edited projects, added Charts (Sprint 6); removed Charts.