nishanthfx98 commented on issue #60836:
URL: https://github.com/apache/airflow/issues/60836#issuecomment-3782403454
Hi @shahar1,
Since the original author has mentioned they are no longer willing to open a
PR, I would like to take up this issue and work on it.
My planned approach is as follows:
1. Extend the internal `_list_mail_ids_desc` method to accept an optional
`max_mails: int | None` parameter, limiting the number of latest matching
emails while preserving the current default behavior when `None`.
2. Propagate the `max_mails` parameter to relevant ImapHook public methods
that retrieve emails or attachments (e.g., `retrieve_mail_attachments`,
`download_mail_attachments`, etc.).
3. Ensure backward compatibility:
- Default value will be `None`
- Existing behavior remains unchanged when the parameter is not provided
4. Add unit tests to validate:
- All attachments are retrieved from the last N emails
- Behavior remains unchanged when `max_mails` is not set
- Interaction with `latest_only=True`
5. Update docstrings and method signatures where applicable.
I’m comfortable working within the providers/imap codebase and following
Airflow’s contribution and testing guidelines.
Please let me know if I can be assigned to this issue.
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]