akuity / kargo

Application lifecycle orchestration
https://kargo.akuity.io/
Apache License 2.0
1.39k stars 114 forks source link

feat(ui): add more information to project list page #2201

Open rbreeze opened 6 days ago

rbreeze commented 6 days ago

Includes new API endpoint that provides a list of Stages for each Project.

Screenshot 2024-06-24 at 15 48 01 Screenshot 2024-06-24 at 15 48 13
netlify[bot] commented 6 days ago

Deploy Preview for docs-kargo-akuity-io ready!

Name Link
Latest commit 7560abf01fe41107f70e14047720608cf192c49e
Latest deploy log https://app.netlify.com/sites/docs-kargo-akuity-io/deploys/667c4ca27ffd340008c1c439
Deploy Preview https://deploy-preview-2201.kargo.akuity.io
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 6 days ago

Codecov Report

Attention: Patch coverage is 0% with 21 lines in your changes missing coverage. Please review.

Project coverage is 46.24%. Comparing base (31848a4) to head (7560abf). Report is 3 commits behind head on main.

Files Patch % Lines
internal/api/list_detailed_projects_v1alpha1.go 0.00% 21 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2201 +/- ## ========================================== - Coverage 46.30% 46.24% -0.06% ========================================== Files 242 243 +1 Lines 16767 16788 +21 ========================================== Hits 7764 7764 - Misses 8632 8653 +21 Partials 371 371 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

krancour commented 2 days ago

I'm a little bit worried about the size of the responses from the new endpoint. It's well within the realm of possibility that the response will contain thousands of Stages -- and Stages can be rather large, given the extent of their Status subresources.

I'd feel better about it if we introduced paging to both the new endpoint and the Projects page -- sorry I know that's a fair bit of scope creep.

If we were to do that, I think it would be tenable to make pageSize list Stages requests. (One for each Project on the current page -- something I wouldn't have considered with an unbounded number of Project per page.)

Ultimately, that would remove the need for the new endpoint. The extent of the back-end changes would just be the addition of paging to the existing list Project endpoint.

Tangentially, I think there may be some security considerations to weigh here as well. Regardless of whether we were to make the suggested changes above or not, there may very likely be an issue of users who are able to list all Projects being unable to list Stages, which makes all of this a tad trickier.

If we were to swap to the paging approach and using existing endpoints, I think we'd just have to make the UI silently ignore 403s from list Stages requests for any given project.