ephraimbuddy commented on code in PR #46844:
URL: https://github.com/apache/airflow/pull/46844#discussion_r1959516663


##########
airflow/models/dagcode.py:
##########
@@ -66,26 +69,41 @@ class DagCode(Base):
     )
     dag_version = relationship("DagVersion", back_populates="dag_code", 
uselist=False)
 
-    def __init__(self, dag_version, full_filepath: str, source_code: str | 
None = None):
+    def __init__(self, dag_version, fileloc: str, source_code: str | None = 
None):
         self.dag_version = dag_version
-        self.fileloc = full_filepath
+        self.fileloc = fileloc
         self.source_code = source_code or DagCode.code(self.dag_version.dag_id)
         self.source_code_hash = self.dag_source_hash(self.source_code)
         self.dag_id = dag_version.dag_id
 
     @classmethod
     @provide_session
-    def write_code(cls, dag_version: DagVersion, fileloc: str, session: 
Session = NEW_SESSION) -> DagCode:
+    def write_code(
+        cls,
+        dag_version: DagVersion,
+        rel_fileloc: str,

Review Comment:
   dag_version already have connection to dag table. We should get the relative 
fileloc from the dag table: `dag_version.dag_model.relative_fileloc`



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