Skip to content

feat: [UIE-10256] - IAM: fix useGetChildAccountsQuery#13419

Merged
aaleksee-akamai merged 4 commits into
linode:developfrom
aaleksee-akamai:UIE-10256
Feb 24, 2026
Merged

feat: [UIE-10256] - IAM: fix useGetChildAccountsQuery#13419
aaleksee-akamai merged 4 commits into
linode:developfrom
aaleksee-akamai:UIE-10256

Conversation

@aaleksee-akamai
Copy link
Copy Markdown
Contributor

@aaleksee-akamai aaleksee-akamai commented Feb 19, 2026

Description 📝

This PR fixes a stale data for the Account Delegations table

Changes 🔄

List any change(s) relevant to the reviewer.

  • update useGetChildAccountsQuery

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

Preview 📷

Before After
Screen.Recording.2026-02-19.at.6.26.58.PM.mov
Screen.Recording.2026-02-19.at.6.25.18.PM.mov

How to test 🧪

Prerequisites

(How to setup test environment)

  • use parent account

Reproduction steps

(How to reproduce the issue, if applicable)

  • Add delegation for a user in Account Delegations table.
  • Change the username of the user.
  • Go back to Account Delegations table.

Verification steps

(How to verify changes)

  • The table should be updated after new data is received
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

Comment thread packages/queries/src/iam/delegation.ts Outdated
return useQuery({
...delegationQueries.childAccounts({ params, users, filter }),
placeholderData: keepPreviousData,
...queryPresets.shortLived,
Copy link
Copy Markdown
Contributor Author

@aaleksee-akamai aaleksee-akamai Feb 19, 2026

Choose a reason for hiding this comment

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

there might be a better approach but so far i’ve only found this one

Copy link
Copy Markdown
Contributor

@abailly-akamai abailly-akamai Feb 20, 2026

Choose a reason for hiding this comment

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

The proper approach would be to delete placeholderData: keepPreviousData all together (no need to replace it with short lived) and invalidate delegationQueries.childAccounts on PUT and DELETE users/<user>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, it makes sense, thanks!

@aaleksee-akamai aaleksee-akamai self-assigned this Feb 19, 2026
@aaleksee-akamai aaleksee-akamai added the IAM Delegation Implementing the new Parent/Child delegation UI label Feb 19, 2026
@aaleksee-akamai aaleksee-akamai marked this pull request as ready for review February 20, 2026 08:33
@aaleksee-akamai aaleksee-akamai requested a review from a team as a code owner February 20, 2026 08:33
@linode-gh-bot
Copy link
Copy Markdown

Cloud Manager UI test results

🔺 1 failing test on test run #4 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
1 Failing867 Passing11 Skipped36m 7s

Details

Failing Tests
SpecTest
account-switching.spec.tsCloud Manager Cypress Tests→Parent/Child account switching→From Parent to Child » can search child accounts

Troubleshooting

Use this command to re-run the failing tests:

pnpm cy:run -s "cypress/e2e/core/parentChild/account-switching.spec.ts"

Copy link
Copy Markdown
Contributor

@abailly-akamai abailly-akamai left a comment

Choose a reason for hiding this comment

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

Great! this is nicer.

I wonder if there's more invalidation cases we're not thinking about but this is one is now handled 👍

Copy link
Copy Markdown
Contributor

@mpolotsk-akamai mpolotsk-akamai left a comment

Choose a reason for hiding this comment

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

Great fix! Thanks!

@github-project-automation github-project-automation Bot moved this from Review to Approved in Cloud Manager Feb 24, 2026
@aaleksee-akamai aaleksee-akamai merged commit 595817e into linode:develop Feb 24, 2026
34 of 35 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Merged in Cloud Manager Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IAM Delegation Implementing the new Parent/Child delegation UI

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants