SargamPuram opened a new pull request, #17246:
URL: https://github.com/apache/dolphinscheduler/pull/17246

   ⚠️ **Draft PR** — Groundwork for Issue #17167 
   Work in Progress
   
   - add tenant_id column + FK in t_ds_worker_group
   - Added new DAO methods:
     - queryByIdsAndTenant
     - queryAllWorkerGroupByTenant
   - Updated backend logic to respect tenant boundaries in worker group 
selection
   - Implemented getUiWorkerGroupPageDetailsByTenant helper method
   - Work in progress: frontend logic and migration scripts
   
   This partially implements tenant-based filtering for worker groups.
   
   Not tested end-to-end yet due to local setup issues; submitting as draft .
   
   
   This is a draft PR; local testing and frontend integration pending.
   
   <!--Thanks very much for contributing to Apache DolphinScheduler, we are 
happy that you want to help us improve DolphinScheduler! -->
   
   ## Purpose of the pull request
   tenant association to WorkerGroup
   1. **DB schema**  
      - ALTER TABLE t_ds_worker_group ADD tenant_id (FK → t_ds_tenant)
   
   2. **Entity**  
      - WorkerGroup.java: add `tenantId`, `tenantCode`
   
   3. **DAO/Mapper**  
      - New methods `queryAllWorkerGroupByTenant`, `queryByIdsAndTenant`
      -  XML for those queries
   
   4. **Service**  
      - `queryAllGroup()` now filters by `loginUser.getTenantId()`
   
   
   ## Open questions
   - Admin-user visibility scope?
   - Backward compatibility
   
   Closes nothing yet — this is the first draft for feedback.  
   Looking forward to your reviews!
   
   <!--(For example: This pull request adds checkstyle plugin).-->
   
   ## Brief change log
   
   <!--*(for example:)*
   - *Add maven-checkstyle-plugin to root pom.xml*
   -->
   
   ## Verify this pull request
   
   <!--*(Please pick either of the following options)*-->
   
   <!--This pull request is code cleanup without any test coverage.-->
   
   <!--*(or)*-->
   
   <!--This pull request is already covered by existing tests, such as *(please 
describe tests)*.-->
   
   <!--(or)-->
   
   <!--This change added tests and can be verified as follows:-->
   
   <!--*(example:)*
   - *Added dolphinscheduler-dao tests for end-to-end.*
   - *Added CronUtilsTest to verify the change.*
   - *Manually verified the change by testing locally.* -->
   
   <!--(or)-->
   
   ## Pull Request Notice
   [Pull Request 
Notice](https://github.com/apache/dolphinscheduler/blob/dev/docs/docs/en/contribute/join/pull-request.md)
   
   If your pull request contains incompatible change, you should also add it to 
`docs/docs/en/guide/upgrade/incompatible.md`
   


-- 
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