Preserve duplicate IMAP attachment filenames#66123
Conversation
Adds an overwrite_file option to keep existing behavior by default while allowing duplicate attachment names to be written with numeric suffixes. Includes unit coverage for duplicate in-memory names and existing files on disk.\n\nAI-assisted-by: OpenAI Codex GPT-5.5; used to inspect the issue, implement the scoped change, and run validation.
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
|
@arjunrawal1 A few things need addressing before review — see our Pull Request quality criteria.
No rush. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting |
|
@arjunrawal1 A few things need addressing before review — see our Pull Request quality criteria. Issues found:
What to do next:
No rush — take your time. We appreciate your contribution and are happy to wait for updates. If you have questions, feel free to ask on the Airflow Slack. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
|
@arjunrawal1 A few things need addressing before review — see our Pull Request quality criteria.
No rush. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting |
|
@arjunrawal1 A few things need addressing before review — see our Pull Request quality criteria.
No rush. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting |
|
@arjunrawal1 Converting to draft — this PR does not yet meet our Pull Request quality criteria.
See the linked criteria for how to fix each item, then mark the PR "Ready for review". This is not a rejection — just an invitation to bring the PR up to standard. No rush. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
|
Closing as a stale triaged draft — no update in ~9 days since the triage note. No worries: reopen this or open a fresh PR whenever you're ready to continue. Thanks for the contribution! |
Adds an
overwrite_fileoption toImapHook.download_mail_attachments()so duplicate attachment filenames can be preserved instead of silently overwriting earlier files. The default remainsTrue, so existing behavior is unchanged unless callers opt in to suffix-based deduplication.Closes: #65870
Related: #62321
Tests/validation:
git diff --checkpython3 -m py_compile providers/imap/src/airflow/providers/imap/hooks/imap.py providers/imap/tests/unit/imap/hooks/test_imap.pyPYTHONPATH=devel-common/src:providers/imap/src:. python3 -m pytest providers/imap/tests/unit/imap/hooks/test_imap.py -q, but the local environment is missing the Airflow test dependencytime_machine.Was generative AI tooling used to co-author this PR?
Generated-by: [OpenAI Codex GPT-5.5] following the guidelines
{pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.Note
🛠️ Maintainer triage note for @arjunrawal1 · by
@potiuk· 2026-06-18 21:56 UTCClosing to keep the review queue clean — this draft was triaged ~9 days ago and there's been no update since:
Automated triage — may be imperfect; a maintainer takes the next look.