shahar1 commented on issue #61766:
URL: https://github.com/apache/airflow/issues/61766#issuecomment-3899855176

   > HI! I have tested new feature **max_mails** added in PR 
[#60963](https://github.com/apache/airflow/pull/60963) with my test Airflow 
Deployment (Airflow==2.11. Python 3.12.3). I used my company's production IMAP 
server and real-case scenario. I have 3 emails returned by filter, each with 2 
attachments, but I needed to retrieve only last mail. I tested methods 
_has_mail_attachment_, _retrieve_mail_attachments_, and 
_download_mail_attachments_ with different settings for max_mails. Here are 
some logs:
   > 
   > ```
   > [2026-02-13, 20:50:34 UTC] {logging_mixin.py:190} INFO - attachemnts found 
with max_mails: True
   > [2026-02-13, 20:50:34 UTC] {logging_mixin.py:190} INFO - count attachments 
without max_mails: 6
   > [2026-02-13, 20:50:34 UTC] {logging_mixin.py:190} INFO - count attachments 
with max_mails=1: 2
   > [2026-02-13, 20:50:34 UTC] {logging_mixin.py:190} INFO - count attachments 
with max_mails=1 and latest_only: 1
   > [2026-02-13, 20:50:38 UTC] {logging_mixin.py:190} INFO - downloaded 
attachments without max_mails: 4
   > [2026-02-13, 20:50:39 UTC] {logging_mixin.py:190} INFO - downloaded 
attachments with max_mails=1: 2
   > [2026-02-13, 20:50:40 UTC] {logging_mixin.py:190} INFO - downloaded 
attachments with max_mails=1 and latest_only: 1
   > ```
   > 
   > Everything works as expected, exept one detail. Since some files have same 
names, _download_mail_attachments_ method overwrites them. So instead of 6 
files I get 4. I guess that this is the default behavior of this method, that 
occurs regardless of new feature **max_mails** but nevertheless it should be 
fixed. I will make additional research on this problem and will create an issue 
if my suspicions are correct
   
   Thanks for the detailed info! 
   If it happens regardless of the new feature (which means that it also 
happens in older versions), and you're not able to fix it in the next few days 
- then please create an issue and I'll release it as-is.
   If it's a regression due to the new parameter, or you're able to fix it fast 
- I prefer to postpone the release until it's fixed.
   
   Please let me know ASAP, the vote ends in less than 10 hours (if you don't 
update by then, I'll release it).
   Thank you!


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