Skip to content

Conversation

@venkymano-akamai
Copy link
Contributor

@venkymano-akamai venkymano-akamai commented Aug 12, 2025

Description 📝

In CloudPulse metrics page for DBaaS service dashboard, a max of 5 API calls are made to fetch the clusters, mainly due to difference in the filters we pass to the API.

In this set of changes, we have reduced the instances call to only one, immediately after selecting a dashboard. In the subsequent filter calls / components we use the same use Hook with same filter and apply the filters offline. This helps in better user experience as well reduction in the number of calls we make. This change is applicable for all service types.

Changes 🔄

List any change(s) relevant to the reviewer.

  • Created a common filter constant based on service types, that will be reused in the useResources Hook.
  • Fetch the instances at the top global filter level and introduce a loading state for filters, until the API call is completed.
  • On success of the API call , show the filters as it is and in the filters component reuse the useResources hook with same params and filters for any service type.
  • Also, as a part of this introduced capability for accepting params and filters for the firewall component.

Scope 🚢

Upon production release, changes in this PR will be visible to:

  • All customers
  • Some customers (e.g. in Beta or Limited Availability)
  • No customers / Not applicable

Target release date 🗓️

15-08-2025 on Alpha

Preview 📷

Include a screenshot <img src="" /> or video <video src="" /> of the change.

🔒 Use the Mask Sensitive Data setting for security.

💡 For changes requiring multiple steps to validate, prefer a video for clarity.

5 instances call 1 call after updates
Screenshot 2025-08-12 at 4 04 17 PM Screenshot 2025-08-12 at 4 05 55 PM

How to test 🧪

  • Login as mock since some endpoints are not available.
  • Navigate to metrics and select DBaaS dashboard
  • You will see an instance call in the inspect screen network tab to fetch the list of clusters.
  • Then filters will appear and upon selection, no other instance call will go and metrics will appear.
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All tests and CI checks are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

…nce_call

# Conflicts:
#	packages/manager/src/features/CloudPulse/Alerts/AlertRegions/AlertRegions.tsx
#	packages/manager/src/features/CloudPulse/shared/CloudPulseResourcesSelect.tsx
const getAllFirewallsRequest = () =>
getAll<Firewall>((passedParams, passedFilter) =>
getFirewalls(passedParams, passedFilter),
const getAllFirewallsRequest = (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - Since we need to pass order by and order filters , need this handling in firewall


const supportedRegionIds = getSupportedRegionIds(regions, serviceType);
const xFilterToBeApplied: Filter | undefined = React.useMemo(() => {
if (serviceType === 'firewall') {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need to pass any filters in the alert side for firewalls

@venkymano-akamai venkymano-akamai marked this pull request as ready for review August 13, 2025 13:10
@venkymano-akamai venkymano-akamai requested review from a team as code owners August 13, 2025 13:10
@venkymano-akamai venkymano-akamai requested review from bill-akamai, dmcintyr-akamai and mjac0bs and removed request for a team August 13, 2025 13:10
@dmcintyr-akamai
Copy link
Contributor

i do see fewer identical requests, so it looks like it works, but why is this test (where you removed some of the UI selections) still making 4 identical requests?
image

it is making fewer requests but does it continue making requests in case of failure?

Copy link
Contributor

@mjac0bs mjac0bs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Observed the current behavior with multiple calls.
  • On this branch, confirmed:
  • ✅ One GET call to get the list of instances.
  • ✅ Filters will appear and upon selection, no other instance calls are made and metrics appear.
  • ✅ This is consistence across the different resource types.

@github-project-automation github-project-automation bot moved this from Review to Approved in Cloud Manager Aug 13, 2025
@mjac0bs mjac0bs added the Approved Multiple approvals and ready to merge! label Aug 13, 2025
@venkymano-akamai
Copy link
Contributor Author

i do see fewer identical requests, so it looks like it works, but why is this test (where you removed some of the UI selections) still making 4 identical requests? image

it is making fewer requests but does it continue making requests in case of failure?

yes, it makes four retries to show error message, default behaviour of useQuery hook

@linode-gh-bot
Copy link
Collaborator

Cloud Manager UI test results

🎉 724 passing tests on test run #7 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing724 Passing4 Skipped123m 15s

@venkymano-akamai
Copy link
Contributor Author

Merging this since it has enough approvals and all checks are passing

@venkymano-akamai venkymano-akamai merged commit 844abae into linode:develop Aug 17, 2025
35 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merged in Cloud Manager Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Approved Multiple approvals and ready to merge! Cloud Pulse - Dashboards Cloud Pulse

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants