-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add blog post for 2.10.0 #1052
Merged
Merged
Add blog post for 2.10.0 #1052
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
56dd03a
[WIP] Add blog post for 2.10.0
utkarsharma2 b59517a
Update landing-pages/site/content/en/blog/airflow-2.10.0/index.md
utkarsharma2 88d708f
Add Task Instance History
utkarsharma2 a736694
Add UI changes
utkarsharma2 ea0e7c2
Add dataset details changes
utkarsharma2 0db9cf8
Update landing-pages/site/content/en/blog/airflow-2.10.0/index.md
utkarsharma2 6ea6bc5
Add code suggestions
utkarsharma2 9a29aea
Update post
utkarsharma2 a13beff
Update images
utkarsharma2 c0453a2
Update blogpost
utkarsharma2 73bbed0
Minor changes
utkarsharma2 88fd069
style: replace tab with spaces
Lee-W File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file added
BIN
+1.41 MB
landing-pages/site/content/en/blog/airflow-2.10.0/airflow_dark_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.33 MB
landing-pages/site/content/en/blog/airflow-2.10.0/airflow_light_mode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+97.7 KB
landing-pages/site/content/en/blog/airflow-2.10.0/dag_dependencies_legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+116 KB
landing-pages/site/content/en/blog/airflow-2.10.0/dataset_toggle_off.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+147 KB
landing-pages/site/content/en/blog/airflow-2.10.0/dataset_toggle_on.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+825 KB
landing-pages/site/content/en/blog/airflow-2.10.0/dependency_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
182 changes: 182 additions & 0 deletions
182
landing-pages/site/content/en/blog/airflow-2.10.0/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,182 @@ | ||
--- | ||
title: "Apache Airflow 2.10.0 is here" | ||
linkTitle: "Apache Airflow 2.10.0 is here" | ||
author: "Utkarsh Sharma" | ||
github: "utkarsharma2" | ||
linkedin: "utkarsh-sharma-5791ab8a" | ||
description: "Apache Airflow 2.10.0 is a game-changer, with powerful Dataset improvements and the groundbreaking Hybrid Executor, set to redefine your workflow capabilities!" | ||
tags: [Release] | ||
date: "2024-08-08" | ||
--- | ||
|
||
I'm happy to announce that Apache Airflow 2.10.0 is now available, bringing an array of noteworthy enhancements and new features that will greatly serve our community. | ||
|
||
Apache Airflow 2.10.0 contains over 135 commits, which include 43 new features, 85 improvements, 43 bug fixes, and 26 documentation changes. | ||
|
||
**Details**: | ||
|
||
📦 PyPI: https://pypi.org/project/apache-airflow/2.10.0/ \ | ||
📚 Docs: https://airflow.apache.org/docs/apache-airflow/2.10.0/ \ | ||
🛠 Release Notes: https://airflow.apache.org/docs/apache-airflow/2.10.0/release_notes.html \ | ||
🐳 Docker Image: "docker pull apache/airflow:2.10.0" \ | ||
🚏 Constraints: https://github.com/apache/airflow/tree/constraints-2.10.0 | ||
|
||
|
||
## Multiple Executor Configuration (formerly "Hybrid Execution") | ||
|
||
Each executor comes with its unique set of strengths and weaknesses, typically balancing latency, isolation, and compute efficiency. Traditionally, an Airflow environment is limited to a single executor, requiring users to make trade-offs, as no single executor is perfectly suited for all types of tasks. | ||
|
||
We are introducing a new feature that allows for the concurrent use of multiple executors within a single Airflow environment. This flexibility enables users to take advantage of the specific strengths of different executors for various tasks, improving overall efficiency and mitigating weaknesses. Users can set a default executor for the entire environment and, if necessary, assign particular executors to individual DAGs or tasks. | ||
|
||
To configure multiple executors we can pass comma separated list in airflow configuration. The first executor in the list will be the default executor for the environment. | ||
|
||
``` | ||
[core] | ||
executor = 'LocalExecutor,CeleryExecutor' | ||
``` | ||
To make it easier for dag authors, we can also specify aliases for executors that can be specified in the executor configuration | ||
|
||
```commandline | ||
[core] | ||
executor = 'LocalExecutor,KubernetesExecutor,my.custom.module.ExecutorClass:ShortName' | ||
``` | ||
|
||
DAG authors can specify executors to use at the task | ||
```python | ||
BashOperator( | ||
task_id="hello_world", | ||
executor="ShortName", | ||
bash_command="echo 'hello world!'", | ||
) | ||
|
||
@task(executor="KubernetesExecutor") | ||
def hello_world(): | ||
print("hello world!") | ||
``` | ||
|
||
We can also specify executors on the DAG level | ||
|
||
```python | ||
def hello_world(): | ||
print("hello world!") | ||
|
||
def hello_world_again(): | ||
print("hello world again!") | ||
|
||
with DAG( | ||
dag_id="hello_worlds", | ||
default_args={"executor": "ShortName"}, # Applies to all tasks in the DAG | ||
) as dag: | ||
# All tasks will use the executor from default args automatically | ||
hw = hello_world() | ||
hw_again = hello_world_again() | ||
``` | ||
|
||
## Dynamic Dataset scheduling through DatasetAlias | ||
|
||
Airflow 2.10 comes with `DatasetAlias` class which can be passed as a value in the `outlets`, `inlets` on a task, and `schedule` on a DAG. An instance of `DatasetAlias` is resolved dynamically to a real dataset. Downstream can depend on either the resolved dataset or on an alias itself. | ||
|
||
`DatasetAlias` has one argument `name` that uniquely identifies the dataset. The task must first declare the alias as an outlet, and use `outlet_events` or `yield Metadata` to add events to it. | ||
|
||
### Emit a dataset event during task execution through outlet_events | ||
```python | ||
from airflow.datasets import DatasetAlias | ||
|
||
@task(outlets=[DatasetAlias("my-task-outputs")]) | ||
def my_task_with_outlet_events(*, outlet_events): | ||
outlet_events["my-task-outputs"].add(Dataset("s3://bucket/my-task")) | ||
``` | ||
### Emit a dataset event during task execution by yielding Metadata | ||
```python | ||
from airflow.datasets.metadata import Metadata | ||
|
||
@task(outlets=[DatasetAlias("my-task-outputs")]) | ||
def my_task_with_metadata(): | ||
s3_dataset = Dataset("s3://bucket/my-task}") | ||
yield Metadata(s3_dataset, alias="my-task-outputs") | ||
``` | ||
|
||
There are two options for scheduling based on dataset aliases. Schedule based on `DatasetAlias` or real datasets. | ||
|
||
```python | ||
with DAG(dag_id="dataset-alias-producer"): | ||
@task(outlets=[DatasetAlias("example-alias")]) | ||
def produce_dataset_events(*, outlet_events): | ||
outlet_events["example-alias"].add(Dataset("s3://bucket/my-task")) | ||
|
||
with DAG(dag_id="dataset-consumer", schedule=Dataset("s3://bucket/my-task")): | ||
... | ||
|
||
with DAG(dag_id="dataset-alias-consumer", schedule=DatasetAlias("example-alias")): | ||
... | ||
``` | ||
### Dataset Aliases UI Enhancements | ||
|
||
Now users can see Dataset Aliases in legend of each cross-dag dependency graph with a corresponded icon/color. | ||
|
||
![DAG Dependencies graph](dag_dependencies_1.png) | ||
|
||
## Dark Mode for Airflow UI | ||
|
||
Airflow 2.10 comes with new Dark Mode feature which is designed to enhance user experience by offering an alternative visual theme that is easier on the eyes, especially in low-light conditions. You can toggle the crescent icon on the right side of the navigation bar to switch between light and dark mode. | ||
|
||
![Airflow Dark mode](airflow_dark_mode.png) | ||
|
||
![Airflow Light mode](airflow_light_mode.png) | ||
|
||
|
||
|
||
## Task Instance History | ||
|
||
In Apache Airflow 2.10.0, when a task instance is retried or cleared, its execution history is maintained. You can view this history by clicking on the task instance in the Grid view, allowing you to access information about each attempt, such as logs, execution durations, and any failures. This feature improves transparency into the task's execution process, making it easier to troubleshoot and analyze your DAGs. | ||
|
||
![Task instance history](task_instance_history.png) | ||
|
||
The history displays the final values of the task instance attributes for each specific run. On the log page, you can also access the logs for each attempt of the task instance. This information is valuable for debugging purposes. | ||
|
||
![Task instance history](task_instance_history_log.png) | ||
|
||
## Dataset UI Enhancements | ||
|
||
The dataset page has been revamped to include a focused dataset events section with additional details such as extras, consuming DAGs, and producing tasks. | ||
![Dataset list](dataset_list.png) | ||
|
||
We now have separate dependency graph and dataset list pages in new tabs, enhancing the user experience. | ||
|
||
![Dataset dependency graph](dependency_graph.png) | ||
|
||
Dataset events are now displayed in both the Details tab of each DAG run and within the DAG graph. | ||
|
||
![Dataset list](dataset_details.png) | ||
|
||
|
||
### Toggle datasets in Graph | ||
|
||
We can now toggle the datasets in the DAG graph | ||
|
||
![Dataset toggle button on](dataset_toggle_on.png) | ||
![Dataset toggle button off](dataset_toggle_off.png) | ||
|
||
### Dataset Conditions in DAG Graph view | ||
We now display the graph view with logical gates. Datasets with actual events are highlighted with a different border, making it easier to see what triggered the selected run. | ||
|
||
![Render dataset conditions in graph view](render_dataset_conditions.png) | ||
|
||
### Dataset event info in DAG Graph | ||
For a DAG run, users can now view the dataset events connected to it directly in the graph view. | ||
|
||
![Dataset event info](dataset_info.png) | ||
|
||
## Additional new features | ||
|
||
Here are just a few interesting new features since there are too many to list in full: | ||
|
||
* Deferrable operators can now execute directly from the triggerer without needing to go through the worker. This is especially efficient for certain operators, like sensors, and can help teams save both time and money. | ||
* Airflow 2.10 introduces a new button for on-demand DAG reparsing. | ||
* Crucial executor logs are now integrated into the task logs. If the executor fails to start a task, the relevant error messages will be available in the task logs, simplifying the debugging process. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add Open Telemetry traces ? cc : @howardyoo |
||
## Contributors | ||
|
||
Thanks to everyone who contributed to this release, including Amogh Desai, Andrey Anshin, Brent Bovenzi, Daniel Standish, Ephraim Anierobi, Hussein Awala, Jarek Potiuk, Jed Cunningham, Jens Scheffler, Tzu-ping Chung, Vincent Beck, Wei Lee, and over 120 others! | ||
utkarsharma2 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
I hope you enjoy using Apache Airflow 2.10.0! |
Binary file added
BIN
+117 KB
landing-pages/site/content/en/blog/airflow-2.10.0/render_dataset_conditions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+116 KB
landing-pages/site/content/en/blog/airflow-2.10.0/task_instance_history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+153 KB
landing-pages/site/content/en/blog/airflow-2.10.0/task_instance_history_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The numbers seem off. I need to figure out how to get the proper data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We normally just get the counts from the release notes. Close enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should clarify, we get the feature/improvement/etc numbers from the release notes. The commit count comes directly from git, sorta like the query to find the top contributors. 135 is definitely low.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jedcunningham I updated the count using git compare. PTAL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My gut tells me you've swung too far in the other direction. Trying to get just core commits, roughly.