vanphuoc3012 opened a new pull request, #12203:
URL: https://github.com/apache/gravitino/pull/12203

   ### What changes were proposed in this pull request?
   
   This PR updates the V2 Web UI metalakes page to avoid fetching metalakes 
before authentication bootstrap is ready.
   
   The metalake store reset still runs when the page mounts, but the metalake 
fetch now waits until the auth type is known. For OAuth/OIDC authentication, it 
also waits until the OAuth token exists in Redux before calling the metalake 
API.
   
   ### Why are the changes needed?
   
   Before this change, the metalakes page called `fetchMetalakes()` immediately 
on mount. In OAuth/OIDC mode, this could race with the asynchronous auth 
bootstrap after login. The page could request metalake data before the access 
token was available, causing unauthorized API calls, redirects back to login, 
or an empty metalakes page.
   
   Fix: #12200
   
   ### Does this PR introduce _any_ user-facing change?
   
   No user-facing API or configuration changes.
   
   For OAuth/OIDC users, the V2 Web UI avoids making the metalake API request 
until the OAuth token is ready.
   
   ### How was this patch tested?
   
   Ran formatter for the V2 Web UI:
   
   ```bash
   cd web-v2/web && pnpm format
   ```
   
   Verified the PR diff is minimal and only changes:
   
   ```text
   web-v2/web/src/app/metalakes/page.js
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to