fix(serverless): show runtime columns and honor log sort - #131
Conversation
App, endpoint, and task tables were hiding fields the API already returns, and logs reversed every page so --sort and prevCursor could not be used.
|
Important Review skippedAuto reviews are disabled on this repository. To trigger a review, include ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| return string(*rt.Status) | ||
| } | ||
|
|
||
| func formatEndpointRate(rt *serverlessapi.EndpointRuntime) string { |
There was a problem hiding this comment.
suggestion (non-blocking): formatEndpointRate, formatEndpointP95 and formatEndpointP99 repeat the same nil guard, and both endpoint tables repeat the same four calls. Use one endpointRuntimeCells(rt) helper that returns the four cells, and call it from endpointsResult and endpointResult.
A plain apps logs now fetches newest (the API default) and prints oldest first, so --follow continues from the latest entries instead of the oldest twenty in the window.
wilsonsilva
left a comment
There was a problem hiding this comment.
The default sort fix looks good. Plain apps logs shows the latest entries again. Thanks!
Summary
apps showtables include effective max workers, active workers, queue depth, and 24h requests.apps logshonors--sort oldest|newest(default oldest) and prints both next and previous cursors, without reversing the API page.Test plan
apps showtable includes the runtime rows when the API returns themapps endpoints listandapps tasks listshow the new columnsapps logs --sort newestprints newest first, and the cursor hints include--sort newestplus a previous page whenprevCursoris set