-
Notifications
You must be signed in to change notification settings - Fork 124
Trigger API Endpoint call reduction #1251
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
base: master
Are you sure you want to change the base?
Conversation
…project and do this sorting on the client side.
console2/src/components/organisms/ProjectActivity/ProjectRepositories.tsx
Outdated
Show resolved
Hide resolved
console2/src/components/organisms/ProjectActivity/ProjectRepositories.tsx
Outdated
Show resolved
Hide resolved
| dispatch, | ||
| }); | ||
|
|
||
| const triggerInfo = useApi<TriggerEntry[]>(fetchTriggers, { |
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.
This triggerInfo object can contain an error, AFAIR? We should display it if that's the case.
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.
on a per-trigger level, or the request as a whole? Is there a standard way of reporting errors or should I just add some UI element with a red background? I haven't crawled the frontend codebase as much.
Goal is to reduce the amount of calls to the
/api/v2/triggerendpoint in the project repository view ; specifically in context of particularly large projects with many triggers it might be preferable to batch the data in one request rather than an arbitrarily large list of them that gets re-fetched any time there's a re-render (ie: when filtering the repository list). Also included is a debounce on the repository filter. Might be worth adding a configurable default debounce time (ie: in scenarios that debounce based on human input, the debounce time is configurable rather than hardcoded). Open to discussion on the value of such a configuration.