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 ,
@@ -138,7 +135,6 @@ def __init__(
138135 self .timezone = timezone
139136 self ._user = user
140137 self ._project = project
141- self ._tenant = tenant
142138 self .worker_group = worker_group
143139 self .warning_type = warning_type
144140 if warning_type .strip ().upper () not in ("FAILURE" , "SUCCESS" , "ALL" , "NONE" ):
@@ -176,16 +172,6 @@ def __enter__(self) -> "Workflow":
176172 def __exit__ (self , exc_type , exc_val , exc_tb ) -> None :
177173 WorkflowContext .delete ()
178174
179- @property
180- def tenant (self ) -> Tenant :
181- """Get attribute tenant."""
182- return Tenant (self ._tenant )
183-
184- @tenant .setter
185- def tenant (self , tenant : Tenant ) -> None :
186- """Set attribute tenant."""
187- self ._tenant = tenant .name
188-
189175 @property
190176 def project (self ) -> Project :
191177 """Get attribute project."""
@@ -202,7 +188,7 @@ def user(self) -> User:
202188
203189 For now we just get from python models but not from java gateway models, so it may not correct.
204190 """
205- return User (name = self ._user , tenant = self . _tenant )
191+ return User (name = self ._user )
206192
207193 @staticmethod
208194 def _parse_datetime (val : Any ) -> Any :
@@ -436,7 +422,6 @@ def submit(self) -> int:
436422 self .execution_type ,
437423 self .timeout ,
438424 self .worker_group ,
439- self ._tenant ,
440425 self .release_state ,
441426 # TODO add serialization function
442427 json .dumps (self .task_relation_json ),
0 commit comments