GayathriSrividya commented on PR #67856:
URL: https://github.com/apache/airflow/pull/67856#issuecomment-4595814996

   > I believe this PR has a similar idea to this one #67550
   
   Thanks for pointing this out.
   
   I checked #67550, and I agree both PRs address the same underlying issue 
from #67525. I opened this PR because the bug is not only about the inflated 
`total_entries`; pagination also needs to happen on distinct `ParseImportError` 
objects before fetching the joined DAG rows.
   
   This PR uses a two-step approach:
   
   1. paginate/count using a deduplicated `ParseImportError` statement, so 
`total_entries`, `limit`, and `offset` operate on import-error objects rather 
than joined DAG rows;
   2. fetch the full DAG associations only for the paginated import-error IDs, 
so authorization/redaction logic still has the DAG context;
   3. restore the final response order using the paginated ID order after the 
second query.
   
   The regression test also covers both the normal request and `limit=1` for a 
single import-error file mapped to multiple DAGs.
   
   I understand #67550 was opened earlier and has a very similar direction. If 
maintainers prefer that PR, I’m happy to close this one. But if the 
order-preserving two-query shape or the added test coverage here is useful, I’m 
happy to adapt this PR based on your feedback.
   


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