Skip to content

Conversation

@kaxil
Copy link
Member

@kaxil kaxil commented Apr 8, 2025

closes #48897


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@kaxil kaxil merged commit c31cb5f into apache:main Apr 8, 2025
95 checks passed
@kaxil kaxil deleted the latest-only branch April 8, 2025 16:39
@jscheffl
Copy link
Contributor

jscheffl commented Apr 21, 2025

I attempted to refresh screenshots for http://apache-airflow-docs.s3-website.eu-central-1.amazonaws.com/docs/apache-airflow/stable/core-concepts/dags.html in context of #45649 ... and attempted to create a new shot for /img/latest_only_with_trigger.png and failed making the example latest_only_with_trigger working to re-create the screenshot. Either I was too stupid or it was too late in the night... or the LatestOnlyOperator is broken? Too lazy to file a bug report... but can @kaxil you briefly check if the example DAG is working as expected on your side? I was testing 3.0.0rc4

Logs:

[2025-04-22, 00:02:35] INFO - DAG bundles loaded: dags-folder, example_dags: source="airflow.dag_processing.bundles.manager.DagBundlesManager"
[2025-04-22, 00:02:35] INFO - Filling up the DagBag from /opt/airflow/airflow-core/src/airflow/example_dags/example_latest_only_with_trigger.py: source="airflow.models.dagbag.DagBag"
[2025-04-22, 00:02:35] INFO - Checking latest only with left_window: 2025-04-06 04:00:00+00:00 right_window: 2025-04-06 04:00:00+00:00 now: 2025-04-21 22:02:35.447824+00:00: source="airflow.task.operators.airflow.providers.standard.operators.latest_only.LatestOnlyOperator"
[2025-04-22, 00:02:35] INFO - Zero-length interval [2025-04-06 04:00:00+00:00, 2025-04-06 04:00:00+00:00) from timetable (<class 'airflow.timetables.trigger.DeltaTriggerTimetable'>); treating current run as latest.: source="airflow.task.operators.airflow.providers.standard.operators.latest_only.LatestOnlyOperator"
[2025-04-22, 00:02:35] INFO - Branch into ['task1']: source="airflow.task.operators.airflow.providers.standard.operators.latest_only.LatestOnlyOperator"
[2025-04-22, 00:02:35] INFO - Following branch {'task1'}: source="airflow.task.operators.airflow.providers.standard.operators.latest_only.LatestOnlyOperator"
[2025-04-22, 00:02:35] INFO - Skipping tasks []: source="airflow.task.operators.airflow.providers.standard.operators.latest_only.LatestOnlyOperator"
[2025-04-22, 00:02:35] INFO - Pushing xcom: ti="RuntimeTaskInstance(id=UUID('01965a5f-e162-7035-90c0-23f7bf0567c2'), task_id='latest_only', dag_id='latest_only_with_trigger', run_id='scheduled__2025-04-06T00:00:00+00:00', try_number=1, map_index=-1, hostname='a8cfc25a576e', context_carrier=None, task=<Task(LatestOnlyOperator): latest_only>, bundle_instance=LocalDagBundle(name=example_dags), max_tries=0, start_date=datetime.datetime(2025, 4, 21, 22, 2, 35, 333350, tzinfo=TzInfo(UTC)), end_date=None, is_mapped=False)": source="task"
[2025-04-22, 00:02:35] INFO - Task instance is in running state: chan="stdout": source="task"
[2025-04-22, 00:02:35] INFO -  Previous state of the Task instance: queued: chan="stdout": source="task"
[2025-04-22, 00:02:35] INFO - Current task name:latest_only: chan="stdout": source="task"
[2025-04-22, 00:02:35] INFO - Dag name:latest_only_with_trigger: chan="stdout": source="task"
[2025-04-22, 00:02:35] INFO - Task instance in success state: chan="stdout": source="task"
[2025-04-22, 00:02:35] INFO -  Previous state of the Task instance: running: chan="stdout": source="task"
[2025-04-22, 00:02:35] INFO - Task operator:<Task(LatestOnlyOperator): latest_only>: chan="stdout": source="task"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

LatestOnlyOperator not working with TaskSDK Dag import.

3 participants