joshmarkovic commented on issue #74092: URL: https://github.com/apache/airflow/issues/74092#issuecomment-5962032379
I'd like to start on this. Since it builds on the draining state added in #72407, I want to check the direction first. Proposal: - Add a nullable paused_until timestamp to the Dag. It can only be set when pausing or draining a Dag. - A pause or drain request that includes paused_until sets or replaces it, and one that sends it as null removes it. A request that leaves it out keeps it, so bulk actions and other state changes don't silently drop a timer. Unpausing always removes it, and so does the auto-pause after repeated failed runs, so a person decides when to resume. - A scheduler step, modeled on the one that finishes a drain, returns Dags to active once paused_until has passed. It adds a pause_expired entry to the audit log. From then on, the Dag behaves as if someone had unpaused it. - If the time passes while the Dag is still draining, it goes straight back to active. - The REST API accepts paused_until alongside is_paused or scheduling_state, for single and bulk updates, and returns it in Dag responses. airflowctl gets --until on dags pause and dags drain. - In the UI, the toggle stays a single click. A separate "Pause for" action offers 1 hour, 4 hours, 1 day, or a chosen date and time. A paused Dag shows "Paused until ..." where the next run would normally be. I plan two PRs. The first covers the model, migration, scheduler, API, airflowctl and docs. The second covers the UI, after #73763 lands, since both touch the same components. Questions: - Does paused_until work as the name, or would you prefer something else? - Is a separate "Pause for" action the right place, or should the choice live in the toggle's pause flow? --- Drafted-by: Claude Code (Opus 5.5); reviewed by @joshmarkovic before posting -- 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]
