Backfill requests omit the first logical date

Aperta Adatta ai principianti
#7 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
82/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api, backend

Direzione di ricerca

Inizia in plugins/linkedin/airflow/backfill/utils/request_handling.py, intorno al validator alle righe 102-106, quindi riproduci le richieste con una data e con tre date tramite il servizio di creazione dell'API usando uno store SQLite nuovo. Assicurati che le logical_dates memorizzate e restituite includano l'intera finestra, mentre le finestre vuote continuino a essere rifiutate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Backfill requests omit the first date from the stored and returned logical_dates. A one-date request records an empty list, while a three-date request records only its last two dates.

I reproduced this with Airflow 2.10.1, Python 3.9.6 and the plugin's 1.0.4 validator, which is unchanged in current main.

For a daily DAG starting on January 1:

from airflow import DAG
from airflow.operators.empty import EmptyOperator
from airflow.utils import timezone

with DAG(
    dag_id="date_retention_multiple",
    start_date=timezone.parse("2024-01-01"),
    schedule="@daily",
    catchup=False,
) as dag:
    EmptyOperator(task_id="noop")

The creation request was:

{
  "dag_id": "date_retention_multiple",
  "start_date": "2024-01-01",
  "end_date": "2024-01-03",
  "delete_duration_days": 30
}

The API response and persisted row both contained:

["2024-01-02T00:00:00+00:00", "2024-01-03T00:00:00+00:00"]

They should also contain 2024-01-01T00:00:00+00:00. Restricting the request to January 1 instead records [].

The validator calls any() on Airflow's timetable iterator before collecting its dates, so the emptiness check consumes the first item. Checking the existing materialized date list instead preserves the complete window. I have a small correction that also keeps empty-window rejection.

The reproducer used real DAG parsing, the API creation service and fresh SQLite stores initialized through the normal migration/plugin setup. This establishes the request-metadata defect; it does not claim that the scheduler skips execution of the first date.

Lingua principale
Python
Stelle
10
Fork
4
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di linkedin/Li-Airflow-Backfill-Plugin

Tutte le issue di linkedin/Li-Airflow-Backfill-Plugin

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.