2727from pydolphinscheduler .core .resource_plugin import ResourcePlugin
2828from pydolphinscheduler .exceptions import PyDSParamException , PyDSTaskNoFoundException
2929from pydolphinscheduler .java_gateway import gateway
30- from pydolphinscheduler .models import Base , Project , Tenant , User
30+ from pydolphinscheduler .models import Base , Project , User
3131from pydolphinscheduler .utils .date import MAX_DATETIME , conv_from_str , conv_to_schedule
3232
3333
@@ -87,7 +87,6 @@ class Workflow(Base):
8787 _KEY_ATTR = {
8888 "name" ,
8989 "project" ,
90- "tenant" ,
9190 "release_state" ,
9291 "param" ,
9392 }
@@ -96,7 +95,6 @@ class Workflow(Base):
9695 "name" ,
9796 "description" ,
9897 "_project" ,
99- "_tenant" ,
10098 "worker_group" ,
10199 "warning_type" ,
102100 "warning_group_id" ,
@@ -120,7 +118,6 @@ def __init__(
120118 timezone : Optional [str ] = configuration .WORKFLOW_TIME_ZONE ,
121119 user : Optional [str ] = configuration .WORKFLOW_USER ,
122120 project : Optional [str ] = configuration .WORKFLOW_PROJECT ,
123- tenant : Optional [str ] = configuration .WORKFLOW_TENANT ,
124121 worker_group : Optional [str ] = configuration .WORKFLOW_WORKER_GROUP ,
125122 warning_type : Optional [str ] = configuration .WORKFLOW_WARNING_TYPE ,
126123 warning_group_id : Optional [int ] = 0 ,
@@ -140,7 +137,6 @@ def __init__(
140137 self .timezone = timezone
141138 self ._user = user
142139 self ._project = project
143- self ._tenant = tenant
144140 self .worker_group = worker_group
145141 self .warning_type = warning_type
146142 if warning_type .strip ().upper () not in ("FAILURE" , "SUCCESS" , "ALL" , "NONE" ):
@@ -178,16 +174,6 @@ def __enter__(self) -> "Workflow":
178174 def __exit__ (self , exc_type , exc_val , exc_tb ) -> None :
179175 WorkflowContext .delete ()
180176
181- @property
182- def tenant (self ) -> Tenant :
183- """Get attribute tenant."""
184- return Tenant (self ._tenant )
185-
186- @tenant .setter
187- def tenant (self , tenant : Tenant ) -> None :
188- """Set attribute tenant."""
189- self ._tenant = tenant .name
190-
191177 @property
192178 def project (self ) -> Project :
193179 """Get attribute project."""
@@ -204,7 +190,7 @@ def user(self) -> User:
204190
205191 For now we just get from python models but not from java gateway models, so it may not correct.
206192 """
207- return User (name = self ._user , tenant = self . _tenant )
193+ return User (name = self ._user )
208194
209195 @staticmethod
210196 def _parse_datetime (val : Any ) -> Any :
@@ -438,7 +424,6 @@ def submit(self) -> int:
438424 self .execution_type ,
439425 self .timeout ,
440426 self .worker_group ,
441- self ._tenant ,
442427 self .release_state ,
443428 # TODO add serialization function
444429 json .dumps (self .task_relation_json ),
0 commit comments