Vitor-Avila opened a new pull request, #32231:
URL: https://github.com/apache/superset/pull/32231

   ### SUMMARY
   Currently, in order to make a new schema or catalog available to be used in 
Roles, users would need to perform a dummy update to the DB connection (which 
triggers a permission re-sync). Also, this re-sync is executed in synchronous 
mode, meaning that the DB connection dialog (and the API request) are kept open 
until it's fully processed.
   
   This is not ideal for a few different reasons:
   * The DB connection is actually already updated -- the re-sync happens as a 
consequence of the update.
   * The DB credentials might have access to several catalogs (with countless 
schemas each), which would take a considerable time.
   * The API request is on hold until the operation finishes, holding 
un-necessary resources.
   
   This PR moves this logic to dedicated commands, supporting the sync mode 
approach (default/current behavior) and also an async mode (delegating the 
operation to a celery task). A dedicated endpoint is also added, allowing users 
to trigger a re-sync without having to edit the connection.
   
   I'm planning on doing a follow up specifically for the update DB connection 
flow, but decided to have a first PR mostly focused on adding the feature.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Will be adding attachments soon.
   **Before**
   
   **After**
   
   ### TESTING INSTRUCTIONS
   Tests added.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
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: notifications-unsubscr...@superset.apache.org

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


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

Reply via email to