windmill-labs / windmill

Open-source developer platform to power your entire infra and turn scripts into webhooks, workflows and UIs. Fastest workflow engine (13x vs Airflow). Open-source alternative to Retool and Temporal.
https://windmill.dev
Other
10.91k stars 531 forks source link

floor progress in typescript client #4420

Closed pyranota closed 1 month ago

pyranota commented 1 month ago

If user passes float to setProgress it will result BadRequest from server but without any explanation.

Sometimes it is non intuitive that endpoint accepts only integers, so to reduce confusion we convert progress to int.


[!IMPORTANT] Floors float input to integer in setProgress() in client.ts to prevent server errors.

  • Behavior:
    • Floors float input to integer in setProgress() in client.ts to prevent BadRequest errors from server.
  • Documentation:
    • Updates docstring for setProgress() to include jobId parameter description.

This description was created by Ellipsis for e7230fb5bd94c2ad059e36b6e4dc5b2ec5e3d6a7. It will automatically update as commits are pushed.

pyranota commented 1 month ago

Note: If user passes float to python client, request will fail as well, but this time returned msg will say that server accepts only i32

cloudflare-workers-and-pages[bot] commented 1 month ago

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: e7230fb
Status: ✅  Deploy successful!
Preview URL: https://8b191eab.windmill.pages.dev
Branch Preview URL: https://fix-ts-client-setprogress.windmill.pages.dev

View logs