Skip to content

Add deferrable mode to SFTPOperator #65475

Closed

Description

@sunildataanalytics

Description

The SFTPOperator currently runs in synchronous mode only, blocking
a worker slot for the entire duration of every file transfer.
For large file transfers, this wastes worker resources unnecessarily.

Proposed Solution
Add deferrable=True parameter to SFTPOperator following the same
pattern used in other Airflow providers. When deferrable=True,
the operator will defer execution to a trigger, freeing the worker
slot immediately and allowing the Triggerer to poll for completion.

Implementation Plan

  • Add SFTPOperatorTrigger class in triggers/sftp.py
  • Add deferrable param to SFTPOperator.init()
  • Add defer() call in execute() when deferrable=True
  • Add execute_complete() callback method
  • Add unit tests

Related
Similar to deferrable mode already implemented in SFTPSensor.

I am willing to submit a PR for this.

Use case/motivation

No response

Related issues

No response

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:feature
    needs-triage
    on Apr 19, 2026
  2. boring-cyborg commented on Apr 19, 2026

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  3. removed
    needs-triage
    on Jun 25, 2026
  4. tannnmayy commented on Aug 13, 2026

    @tannnmayy

    Opened a draft PR for this: #71557

    Fresh branch off current main (rebase, not merge). Scope is the four-file feature only — operator, trigger, and their unit tests. hooks/sftp.py and the existing sync path are unchanged.

    Not asking to be assigned; happy to iterate on review.

  5. added a commit that references this issue on Aug 31, 2026
    210549e
  6. added a commit that references this issue on Sep 21, 2026
    2f5d44a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions