Backfill requests omit the first logical date

Abierto Apto para principiantes
#7 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
82/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
api, backend

Línea de trabajo

Comienza en plugins/linkedin/airflow/backfill/utils/request_handling.py, alrededor del validador de las líneas 102-106, y luego reproduce las solicitudes de una y de tres fechas mediante el servicio de creación de API con un almacén SQLite nuevo. Asegúrate de que los logical_dates almacenados y devueltos incluyan la ventana completa, mientras que las ventanas vacías sigan siendo rechazadas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
10
Forks
4
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de linkedin/Li-Airflow-Backfill-Plugin

Todos los issues de linkedin/Li-Airflow-Backfill-Plugin

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.