My thought as well.  I don't think it needs to be optional or default, myself.  
Just making sure I wasn't missing some obvious use case since someone suggested 
it.


 - ferruzzi


________________________________
From: Jarek Potiuk <ja...@potiuk.com>
Sent: Thursday, May 29, 2025 12:34 PM
To: dev@airflow.apache.org
Subject: RE: [EXT] [DISCUSS] Deadlines default interval

CAUTION: This email originated from outside of the organization. Do not click 
links or open attachments unless you can confirm the sender and know the 
content is safe.



AVERTISSEMENT: Ce courrier électronique provient d’un expéditeur externe. Ne 
cliquez sur aucun lien et n’ouvrez aucune pièce jointe si vous ne pouvez pas 
confirmer l’identité de l’expéditeur et si vous n’êtes pas certain que le 
contenu ne présente aucun risque.



Why not make interval mandatory (i.e. no default).

On Mon, May 26, 2025 at 6:31 PM Ferruzzi, Dennis
<ferru...@amazon.com.invalid> wrote:

> Hey folks.  TLDR first, more context below.
>
> rawwar has suggested that the interval on a new DeadlineAlert should
> default to 0.  I can see a usecase for that but I don't feel like that
> should be the default.  What say you?
>
> For some context, as of right now the interval is not optional and does
> not have a default.  Defining a new DeadlineAlert looks something like this:
>
>
> # Some time after a dynamic reference
> DeadlineAlert(
>     reference=DeadlineReference.DAGRUN_QUEUED_AT,
>     interval=timedelta(hours=1),
>     callback=my_warning_callback
> )
>
>
> # Some time before or after a static reference datetime
> DeadlineAlert(
>     reference=DeadlineReference.FIXED_DATETIME(morning_meeting_datetime),
>     interval=timedelta(minutes=-20),
>     callback=going_to_be_close_callback
> )
>
>
> # At a static reference datetime
>
> DeadlineAlert(
>     reference=DeadlineReference.FIXED_DATETIME(morning_meeting_datetime),
>     interval=timedelta(minutes=0),
>     callback=deadline_missed_callback
> )
>
>
> So setting it to 0 is certainly a viable usecase with a fixed reference,
> but personally I don't see it as the default situation.  Throwing it out
> there for discussion to see if I'm missing some usecases and to make sure
> I'm not just being defensive about my original approach.
>
>
>  - ferruzzi
>

Reply via email to