You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "SamWheating (via GitHub)" <gi...@apache.org> on 2026/07/28 10:21:04 UTC

[PR] use archive file path in comparison when checking for stale DAGs in zip packages [airflow]

SamWheating opened a new pull request, #70586:
URL: https://github.com/apache/airflow/pull/70586

    <!-- SPDX-License-Identifier: Apache-2.0
         https://www.apache.org/licenses/LICENSE-2.0 -->
   
   <!--
   Thank you for contributing!
   
   Please provide above a brief description of the changes made in this pull request.
   Write a good git commit message following this guide: https://chris.beams.io/posts/git-commit/
   
   Please make sure that your code changes are covered with tests.
   And in case of new features or big changes remember to adjust the documentation.
   
   For user-facing UI changes, please attach before/after screenshots (or a short
   screen recording) so reviewers can assess the visual impact.
   
   Feel free to ping (in general) for the review if you do not see reaction for a few days
   (72 Hours is the minimum reaction time you can expect from volunteers) - we sometimes miss notifications.
   
   In case of an existing issue, reference it using one of the following:
   
   * closes: #ISSUE
   * related: #ISSUE
   -->
   
   #### The Issue:
   
   When deactivating DAGs, airflow compares the `DagFileStat` generated by the manager to a DAG's fileloc in order to identify DAGs which were not seen on the most recent file parse. 
   
   However, when processing zip-packaged DAGs, the DAG's filelog will be the value of `__file__` reported by zipfile, which specifies a subpath within the zip archive (ex: `path/to/some/dag_package.zip/my_dag.py`).
   
   The parsing stats used to index the last_parsed dictionary use the path of the archive file itself (ex:  `path/to/some/dag_package.zip`)
   
   This means that for zip-packaged DAGs, the `last_parsed.get()` lookup here will never return a value:
   https://github.com/apache/airflow/blob/a25d8702ca03a40f4f73e0a22d759593bf92ae75/airflow-core/src/airflow/dag_processing/manager.py#L499-L503
   
   And thus zip-packaged DAGs are never properly deactivated. 
   
   This issue doesn't surface too often, since most DAGs will also be caught by the `deactivate_deleted_dags` function which properly evaluates them based on inner paths. However for files which produce multiple DAGs ("dag factories") or DAGs which are renamed within a file, this second mechanism won't work either, since DAGs can be removed without the source file being removed.
   
   As a result, certain DAGs within a zip file will never be removed and airflow will continue to attempt to schedule and run them. I have reproduced this issue in breeze on the latest version of `main`.
   
   #### The Fix:
   
   Within the `deactivate_stale_dags` function, we can just remove the inner part of the fileloc for zip-packaged DAGs to obtain the actual filepath of the archive itself. I've added this as a private method on the class, but it could also be added as a property on the `DAG` model itself.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   No
   


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil merged PR #70586:
URL: https://github.com/apache/airflow/pull/70586


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "SamWheating (via GitHub)" <gi...@apache.org>.
SamWheating commented on code in PR #70586:
URL: https://github.com/apache/airflow/pull/70586#discussion_r3690268042


##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -445,6 +445,20 @@ def cleanup_stale_bundle_versions(self) -> None:
         """Clean up stale DAG bundle version usage records."""
         BundleUsageTrackingManager().remove_stale_bundle_versions()
 
+    @staticmethod
+    def _file_name_from_fileloc(fileloc: str) -> str:
+        """
+        If a python file comes from a zip module, return just the path to the zip file.
+
+        file parsing stats are keyed by the top-level filename (path/to/archive.zip).
+        in order to correctly link DAGs to their relevant parsing stats, we need to normalize
+        fileloc to the archive file location, if applicable.
+        """
+        if ".zip" in fileloc:

Review Comment:
   Oh this is a really good suggestion - will update!
   
   Just thinking about whether or not this will introduce other weird edge cases and collisions between archives etc. I think its fine as long as users aren't creating zip-files ending in `.py` or anything super weird like that. 



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "amoghrajesh (via GitHub)" <gi...@apache.org>.
amoghrajesh commented on PR #70586:
URL: https://github.com/apache/airflow/pull/70586#issuecomment-5176304114

   Conflicts on this need to be handled.


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "SamWheating (via GitHub)" <gi...@apache.org>.
SamWheating commented on code in PR #70586:
URL: https://github.com/apache/airflow/pull/70586#discussion_r3690269348


##########
airflow-core/tests/unit/dag_processing/test_manager.py:
##########
@@ -1046,6 +1046,72 @@ def test_scan_stale_dags(self, session):
         # SerializedDagModel gives history about Dags
         assert serialized_dag_count == 1
 
+    @pytest.mark.usefixtures("testing_dag_bundle")
+    def test_scan_stale_dags_deactivates_zip_packaged_dags(self, session, test_zip_path):
+        """
+        Ensure that zip-packaged DAGs are marked inactive when the file is parsed but the
+        DagModel.last_parsed_time is not updated.
+        """
+        manager = DagFileProcessorManager(
+            max_runs=1,
+            processor_timeout=10 * 60,
+        )
+        bundle = MagicMock()
+        bundle.name = "testing"
+        manager._dag_bundles = [bundle]
+
+        test_dag_path = DagFileInfo(
+            rel_path=Path(test_zip_path),
+            bundle_name="testing",
+        )
+        dagbag = DagBag(
+            test_zip_path,
+            bundle_path=test_dag_path.bundle_path,
+        )
+
+        # Add stale DAG to the DB
+        dag = dagbag.get_dag("test_zip_dag")
+        sync_dag_to_db(dag, session=session)
+
+        # Add DAG to the file_parsing_stats
+        stat = DagFileStat(
+            num_dags=1,
+            import_errors=0,
+            last_finish_time=timezone.utcnow() + timedelta(hours=1),
+            last_duration=1,
+            run_count=1,
+            last_num_of_db_queries=1,
+        )
+        manager._files = [test_dag_path]

Review Comment:
   Yeah, shameless copy+paste from other tests, will clean this up 👍 



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "SamWheating (via GitHub)" <gi...@apache.org>.
SamWheating commented on PR #70586:
URL: https://github.com/apache/airflow/pull/70586#issuecomment-5144798111

   Test failure seems unrelated (timeout from dockerhub) could someone re-run when you have a chance? Thanks!


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "SamWheating (via GitHub)" <gi...@apache.org>.
SamWheating commented on code in PR #70586:
URL: https://github.com/apache/airflow/pull/70586#discussion_r3690309022


##########
airflow-core/tests/unit/dag_processing/test_manager.py:
##########
@@ -1046,6 +1046,72 @@ def test_scan_stale_dags(self, session):
         # SerializedDagModel gives history about Dags
         assert serialized_dag_count == 1
 
+    @pytest.mark.usefixtures("testing_dag_bundle")
+    def test_scan_stale_dags_deactivates_zip_packaged_dags(self, session, test_zip_path):
+        """
+        Ensure that zip-packaged DAGs are marked inactive when the file is parsed but the
+        DagModel.last_parsed_time is not updated.
+        """
+        manager = DagFileProcessorManager(
+            max_runs=1,
+            processor_timeout=10 * 60,
+        )
+        bundle = MagicMock()
+        bundle.name = "testing"
+        manager._dag_bundles = [bundle]
+
+        test_dag_path = DagFileInfo(
+            rel_path=Path(test_zip_path),
+            bundle_name="testing",
+        )
+        dagbag = DagBag(
+            test_zip_path,
+            bundle_path=test_dag_path.bundle_path,
+        )
+
+        # Add stale DAG to the DB
+        dag = dagbag.get_dag("test_zip_dag")
+        sync_dag_to_db(dag, session=session)
+
+        # Add DAG to the file_parsing_stats
+        stat = DagFileStat(
+            num_dags=1,
+            import_errors=0,
+            last_finish_time=timezone.utcnow() + timedelta(hours=1),
+            last_duration=1,
+            run_count=1,
+            last_num_of_db_queries=1,
+        )
+        manager._files = [test_dag_path]

Review Comment:
   > _files isn't an attribute the manager itself uses (only tests assign it)
   
   Actually looking into this a bit more, maybe the other tests don't use it either 🤔 Will see if its safe to remove



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "SamWheating (via GitHub)" <gi...@apache.org>.
SamWheating commented on code in PR #70586:
URL: https://github.com/apache/airflow/pull/70586#discussion_r3690268042


##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -445,6 +445,20 @@ def cleanup_stale_bundle_versions(self) -> None:
         """Clean up stale DAG bundle version usage records."""
         BundleUsageTrackingManager().remove_stale_bundle_versions()
 
+    @staticmethod
+    def _file_name_from_fileloc(fileloc: str) -> str:
+        """
+        If a python file comes from a zip module, return just the path to the zip file.
+
+        file parsing stats are keyed by the top-level filename (path/to/archive.zip).
+        in order to correctly link DAGs to their relevant parsing stats, we need to normalize
+        fileloc to the archive file location, if applicable.
+        """
+        if ".zip" in fileloc:

Review Comment:
   Oh this is a really good suggestion - will update!



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #70586:
URL: https://github.com/apache/airflow/pull/70586#discussion_r3707293520


##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -477,10 +477,11 @@ def deactivate_stale_dags(
                 )
                 to_deactivate.add(dag.dag_id)
                 continue
-            # When the Dag's last_parsed_time is more than the stale_dag_threshold older than the
-            # Dag file's last_finish_time, the Dag is considered stale as has apparently been removed from the file,
-            # This is especially relevant for Dag files that generate Dags in a dynamic manner.
-            file_info = DagFileInfo(rel_path=Path(dag.relative_fileloc), bundle_name=dag.bundle_name)
+            rel_path = Path(dag.relative_fileloc)
+            file_info = DagFileInfo(rel_path=rel_path, bundle_name=dag.bundle_name)
+            if file_info not in last_parsed:
+                # Zip-packaged dags are keyed by the archive path, not the inner file, so try the parent as well

Review Comment:
   Since this hunk now conflicts with main (#63185 rewrote it and kept these lines), can the rebase also restore the original three-line comment explaining the staleness heuristic? The threshold comparison below is still the non-obvious part, and the new comment only covers the zip keying.



##########
airflow-core/tests/unit/dag_processing/test_manager.py:
##########
@@ -1046,6 +1044,72 @@ def test_scan_stale_dags(self, session):
         # SerializedDagModel gives history about Dags
         assert serialized_dag_count == 1
 
+    @pytest.mark.usefixtures("testing_dag_bundle")
+    def test_scan_stale_dags_deactivates_zip_packaged_dags(self, session, test_zip_path):
+        """
+        Ensure that zip-packaged DAGs are marked inactive when the file is parsed but the

Review Comment:
   Could the docstring say what this test pins down? Zip dags store `relative_fileloc` as `<archive>.zip/<inner>.py` while `_file_stats` is keyed by the archive path, so without the parent fallback the lookup misses and the dag is never deactivated. As written it reads the same as the sibling test's docstring.



##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -477,10 +477,11 @@ def deactivate_stale_dags(
                 )
                 to_deactivate.add(dag.dag_id)
                 continue
-            # When the Dag's last_parsed_time is more than the stale_dag_threshold older than the
-            # Dag file's last_finish_time, the Dag is considered stale as has apparently been removed from the file,
-            # This is especially relevant for Dag files that generate Dags in a dynamic manner.
-            file_info = DagFileInfo(rel_path=Path(dag.relative_fileloc), bundle_name=dag.bundle_name)
+            rel_path = Path(dag.relative_fileloc)
+            file_info = DagFileInfo(rel_path=rel_path, bundle_name=dag.bundle_name)
+            if file_info not in last_parsed:
+                # Zip-packaged dags are keyed by the archive path, not the inner file, so try the parent as well

Review Comment:
   On the PR body's idea of a property on the DAG model: +1 to giving this mapping a name eventually. This lookup is the reverse of what `_get_observed_filelocs` does for `deactivate_deleted_dags` (archive to inner paths there, fileloc to parse-unit key here), and nothing links the two sites today. If the importer's one-level rule (`_load_modules_from_zip` skips entries with `len(zip_path.parts) > 1`) ever changes, the deletion path would keep working while this fallback silently stops matching. A small helper or `DagFileInfo` classmethod would keep them in step. Fine as a follow-up rather than in this PR.



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #70586:
URL: https://github.com/apache/airflow/pull/70586#issuecomment-5225631918

   ### Backport successfully created: v3-3-test
   
   Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
   the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.
   
   In matter of doubt please ask in [#release-management](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
   
   <table>
           <tr>
           <th>Status</th>
           <th>Branch</th>
           <th>Result</th>
       </tr>
       <tr>
           <td>✅</td>
           <td>v3-3-test</td>
           <td><a href="https://github.com/apache/airflow/pull/71326"><img src="https://img.shields.io/badge/PR-71326-blue" alt="PR Link"></a></td>
       </tr>
   </table>


-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "SamWheating (via GitHub)" <gi...@apache.org>.
SamWheating commented on code in PR #70586:
URL: https://github.com/apache/airflow/pull/70586#discussion_r3690309022


##########
airflow-core/tests/unit/dag_processing/test_manager.py:
##########
@@ -1046,6 +1046,72 @@ def test_scan_stale_dags(self, session):
         # SerializedDagModel gives history about Dags
         assert serialized_dag_count == 1
 
+    @pytest.mark.usefixtures("testing_dag_bundle")
+    def test_scan_stale_dags_deactivates_zip_packaged_dags(self, session, test_zip_path):
+        """
+        Ensure that zip-packaged DAGs are marked inactive when the file is parsed but the
+        DagModel.last_parsed_time is not updated.
+        """
+        manager = DagFileProcessorManager(
+            max_runs=1,
+            processor_timeout=10 * 60,
+        )
+        bundle = MagicMock()
+        bundle.name = "testing"
+        manager._dag_bundles = [bundle]
+
+        test_dag_path = DagFileInfo(
+            rel_path=Path(test_zip_path),
+            bundle_name="testing",
+        )
+        dagbag = DagBag(
+            test_zip_path,
+            bundle_path=test_dag_path.bundle_path,
+        )
+
+        # Add stale DAG to the DB
+        dag = dagbag.get_dag("test_zip_dag")
+        sync_dag_to_db(dag, session=session)
+
+        # Add DAG to the file_parsing_stats
+        stat = DagFileStat(
+            num_dags=1,
+            import_errors=0,
+            last_finish_time=timezone.utcnow() + timedelta(hours=1),
+            last_duration=1,
+            run_count=1,
+            last_num_of_db_queries=1,
+        )
+        manager._files = [test_dag_path]

Review Comment:
   > _files isn't an attribute the manager itself uses (only tests assign it)
   
   Actually, maybe the other tests don't use it either 🤔 Will see if its safe to remove



-- 
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: commits-unsubscribe@airflow.apache.org

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


Re: [PR] Fix deactivation of stale zip-packaged DAGs [airflow]

Posted by "kaxil (via GitHub)" <gi...@apache.org>.
kaxil commented on code in PR #70586:
URL: https://github.com/apache/airflow/pull/70586#discussion_r3690147824


##########
airflow-core/tests/unit/dag_processing/test_manager.py:
##########
@@ -1046,6 +1046,72 @@ def test_scan_stale_dags(self, session):
         # SerializedDagModel gives history about Dags
         assert serialized_dag_count == 1
 
+    @pytest.mark.usefixtures("testing_dag_bundle")
+    def test_scan_stale_dags_deactivates_zip_packaged_dags(self, session, test_zip_path):
+        """
+        Ensure that zip-packaged DAGs are marked inactive when the file is parsed but the
+        DagModel.last_parsed_time is not updated.
+        """
+        manager = DagFileProcessorManager(
+            max_runs=1,
+            processor_timeout=10 * 60,
+        )
+        bundle = MagicMock()
+        bundle.name = "testing"
+        manager._dag_bundles = [bundle]
+
+        test_dag_path = DagFileInfo(
+            rel_path=Path(test_zip_path),
+            bundle_name="testing",
+        )
+        dagbag = DagBag(
+            test_zip_path,
+            bundle_path=test_dag_path.bundle_path,
+        )
+
+        # Add stale DAG to the DB
+        dag = dagbag.get_dag("test_zip_dag")
+        sync_dag_to_db(dag, session=session)
+
+        # Add DAG to the file_parsing_stats
+        stat = DagFileStat(
+            num_dags=1,
+            import_errors=0,
+            last_finish_time=timezone.utcnow() + timedelta(hours=1),
+            last_duration=1,
+            run_count=1,
+            last_num_of_db_queries=1,
+        )
+        manager._files = [test_dag_path]

Review Comment:
   I don't think either `manager._files` or the `MagicMock` bundle above is read on this code path. `_files` isn't an attribute the manager itself uses (only tests assign it), and `deactivate_stale_dags` reads bundle state from the DB, which the `testing_dag_bundle` fixture provides. Looks carried over from the sibling test, these lines can be dropped.



##########
airflow-core/tests/unit/dag_processing/test_manager.py:
##########
@@ -1046,6 +1046,72 @@ def test_scan_stale_dags(self, session):
         # SerializedDagModel gives history about Dags
         assert serialized_dag_count == 1
 
+    @pytest.mark.usefixtures("testing_dag_bundle")
+    def test_scan_stale_dags_deactivates_zip_packaged_dags(self, session, test_zip_path):
+        """
+        Ensure that zip-packaged DAGs are marked inactive when the file is parsed but the
+        DagModel.last_parsed_time is not updated.
+        """
+        manager = DagFileProcessorManager(
+            max_runs=1,
+            processor_timeout=10 * 60,
+        )
+        bundle = MagicMock()
+        bundle.name = "testing"
+        manager._dag_bundles = [bundle]
+
+        test_dag_path = DagFileInfo(
+            rel_path=Path(test_zip_path),

Review Comment:
   Since `bundle_path` isn't set here, `test_dag_path.bundle_path` is None, `DagBag._get_relative_fileloc` falls through, and the DB row ends up with an absolute `relative_fileloc`. Production always stores bundle-relative paths, and the sibling `test_scan_stale_dags` above sets `bundle_path=TEST_DAGS_FOLDER` with a true relative path. Using `rel_path=Path("test_zip.zip"), bundle_path=Path(test_zip_path).parent` (and building the `DagBag` from `test_dag_path.absolute_path`) would exercise the same key shapes as production, and stops the test depending on pytest's tmp dir name not containing `.zip`.



##########
airflow-core/src/airflow/dag_processing/manager.py:
##########
@@ -445,6 +445,20 @@ def cleanup_stale_bundle_versions(self) -> None:
         """Clean up stale DAG bundle version usage records."""
         BundleUsageTrackingManager().remove_stale_bundle_versions()
 
+    @staticmethod
+    def _file_name_from_fileloc(fileloc: str) -> str:
+        """
+        If a python file comes from a zip module, return just the path to the zip file.
+
+        file parsing stats are keyed by the top-level filename (path/to/archive.zip).
+        in order to correctly link DAGs to their relevant parsing stats, we need to normalize
+        fileloc to the archive file location, if applicable.
+        """
+        if ".zip" in fileloc:

Review Comment:
   This matches `.zip` anywhere in the string, so any fileloc that merely contains those four characters gets truncated: `dags/report.zip.py` becomes `dags/report.zip`, and a file under a directory named `extracted.zip/` loses its filename too. The truncated key won't be in `last_parsed`, so the staleness check is silently skipped for such files (the same failure mode this PR fixes), and if the truncated path collides with a real archive's stats key, a live DAG inherits the archive's `last_finish_time` and can be wrongly deactivated.
   
   One way to avoid the string surgery entirely is to try the exact key first and fall back to the parent on a miss. Zip members are only imported from the archive root (`_load_modules_from_zip` skips entries with `len(zip_path.parts) > 1`), so the parent of a zip-inner fileloc is always the archive itself:
   
   ```python
   rel_path = Path(dag.relative_fileloc)
   file_info = DagFileInfo(rel_path=rel_path, bundle_name=dag.bundle_name)
   if file_info not in last_parsed:
       # Zip-packaged dags are keyed by the archive path, not the inner file.
       file_info = DagFileInfo(rel_path=rel_path.parent, bundle_name=dag.bundle_name)
   ```
   
   This also covers archives not named `*.zip`, which do get parsed today since discovery and routing are content-based (`zipfile.is_zipfile`) but would never match the `.zip` check here. Reusing `correct_maybe_zipped` isn't an option either, its `zipfile.is_zipfile` gate would resolve the bundle-relative path against the processor's cwd and return the fileloc unchanged.



-- 
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: commits-unsubscribe@airflow.apache.org

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