-
Notifications
You must be signed in to change notification settings - Fork 6
EOL Runtime Scanner: Initial Table Edition #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Lytol
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, reads very clearly to me! I had a single ultra nit, so feel free to ignore it entirely, but it's more for my own style understanding in the R world.
One other general observation: it's pretty slow since we're loading ALL the content and then letting reactable do the front-end pagination. /search/content supports server-side pagination and may be a better match once we start "productionizing". Not something to worry about now, but earmark for down the road.
| @@ -0,0 +1,39 @@ | |||
| library(connectapi) | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIL: NA_real_
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah — this stuff is only in here because I've been tardy pushing through the guild PR to add it to connectapi.
| to_timestamp <- to_iso8601(to) | ||
|
|
||
| usage_raw <- client$GET( | ||
| connectapi:::v1_url("instrumentation", "content", "hits"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ultra nit: You use the package namespace here in get_usage.R, but you omit it in app.R. Any reason for the difference? I'm mostly accustomed to omitting it once you've included with library(<package>), and specifying without an explicit library(<package>)... like with tibble above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The three colons operator lets you reach into a package's private functions — it's the only way to access those generally speaking.
For comparison, two colons (connectapi::connect()) are used to access a function in a package namespace without loading it via library() and would be unnecessary here.
Yep, I think that performance improvements will also be helpful getting feedback. There are a few things I think hurt performance:
Some changes I'm planning to make next/soon will help with performance:
|
Fixes https://github.com/posit-dev/connect/issues/31745
First commit of an End of Life Runtime Scanner app.
This is a really minimal first iteration, which shows a table of content on the server. The table displays the content GUID, the title, the app mode, and the R, Python, and Quarto versions. There's also a link to the Dashboard URL, and it uses the usage data to display the number of hits in the last week (numerically, nothing fancy).
It's deployed here: https://dogfood.team.pct.posit.it/eol-runtime-scanner/
For this version, I really erred on the side of doing as little as possible, I was fine with adding too little. For example, it doesn't use a visitor client (there's an issue for that). I added an app mode filter to it, but that was causing me to spin on the ordering of some of the reactives (causing performance issues) so I'm deferring it till another iteration.