ArafatKhan2198 commented on PR #8933:
URL: https://github.com/apache/ozone/pull/8933#issuecomment-3178086689

   Thanks for the suggestion @devabhishekpal 
   
   You raise a valid concern, but the API + CLI approach is actually the 
correct design choice. The `ozone admin namespace` commands already follow this 
exact pattern - `summary`, `usage`, `quota`, and `dist` all call their 
respective Recon API endpoints. Adding `rebuild` as `POST 
/api/v1/namespace/rebuild` maintains this architectural consistency.
   
   The custom headers we added (like `X-Requested-With: OzoneAdminCLI`) ensure 
that only our OZONE CLI can trigger the rebuild - browsers and casual web 
requests get blocked. This gives us the security we need without making things 
overly complex. Plus, this approach provides better separation of concerns (CLI 
handles user interaction, API handles business logic) and enables future 
extensibility.
   
   The existing namespace commands prove this pattern works well, and 
implementing rebuild directly in CLI would require duplicating logic, bypassing 
security controls, and creating inconsistency with the established architecture.
   
   All the checkboxes are ticked and I don't see any reasonable reason as to 
drop this approach. 


-- 
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: issues-unsubscr...@ozone.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@ozone.apache.org
For additional commands, e-mail: issues-h...@ozone.apache.org

Reply via email to