Updating Apache Airflow™ and Python versions
You can find the list of supported versions in the Versioning section.
When updating versions in Managed Service for Apache Airflow™, you can change the following:
-
Python version to any supported one for the current Apache Airflow™ version.
-
Apache Airflow™ version to the next supported version within the same branch:
2.Xor3.X.You cannot update Apache Airflow™ from
2.Xto3.X. To update to3.X, create a new cluster and attach the old cluster's DAG storage to it.
Managed Service for Apache Airflow™ does not allow simultaneous updates of Apache Airflow™ and Python versions because user dependencies may stop working on newer Python versions.
For example, to update a cluster from Apache Airflow™ 2.8 and Python 3.8 to Apache Airflow™ 2.10 and Python 3.12:
- Update Python to
3.10and test the cluster with its dependencies. - Update Apache Airflow™ to
2.10and test the cluster after you migrate the database. - Update Python to
3.12and test the dependencies again.
To learn about updates within the same version and host maintenance, see Maintenance.
Alert
Before the upgrade, make sure it will not affect your applications: review the release notes
Once your Apache Airflow™ version is upgraded, you cannot revert the cluster to the previous version.
To upgrade your Apache Airflow™ or Python version:
- In the management console
, navigate to the relevant folder. - Navigate to the Managed Service for Apache Airflow™ service.
- In the cluster row, click
and select Edit. - In the Version field, select the Apache Airflow™ and Python version you need.
- Click Save.
If you do not have the Yandex Cloud CLI yet, install and initialize it.
The folder used by default is the one specified when creating the CLI profile. To change the default folder, use the yc config set folder-id <folder_ID> command. You can also set a different folder for any specific command using the --folder-name or --folder-id options.
To upgrade your Apache Airflow™ or Python version:
-
Get the list of your Managed Service for Apache Airflow™ clusters:
yc managed-airflow cluster list -
Get information about the cluster you need and check the version in the
config.airflow_versionandconfig.python_versionproperties:yc managed-airflow cluster get <cluster_name_or_ID> -
To upgrade your Apache Airflow™ version, run this command:
yc managed-airflow cluster update <cluster_name_or_ID> \ --airflow-version=<new_version_number> -
To upgrade your Python version, run this command:
yc managed-airflow cluster update <cluster_name_or_ID> \ --python-version=<new_version_number>
To upgrade your Apache Airflow™ or Python version:
-
Open the current Terraform configuration file describing your infrastructure.
For more on how to create this file, see Creating a cluster.
-
Add the
airflow_versionorpython_versionparameter to the cluster description or update it if it is already there:resource "yandex_airflow_cluster" "<cluster_name>" { ... airflow_version = "<Apache_Airflow™_version>" python_version = "<Python_version>" } -
Validate your configuration.
-
In the command line, navigate to the directory that contains the current Terraform configuration files defining the infrastructure.
-
Run this command:
terraform validateTerraform will show any errors found in your configuration files.
-
-
Confirm updating the resources.
-
Run this command to view the planned changes:
terraform planIf you described the configuration correctly, the terminal will display a list of the resources to update and their parameters. This is a verification step that does not apply changes to your resources.
-
If everything looks correct, apply the changes:
-
Run this command:
terraform apply -
Confirm updating the resources.
-
Wait for the operation to complete.
-
-
For more information, see this Terraform provider guide.
To upgrade your Apache Airflow™ or Python version:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Call the Cluster.Update method and run the request, e.g., via cURL
.Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
updateMaskparameter as a single comma-separated string.-
To upgrade your Apache Airflow™ version, run this request:
curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://airflow.api.cloud.yandex.net/managed-airflow/v1/clusters/<cluster_ID>' \ --data '{ "updateMask": "airflowVersion", "airflowVersion": "<Apache_Airflow™_version>" }'Where:
-
updateMask: List of parameters to update. Specify onlyairflowVersion. -
airflowVersion: Target Apache Airflow™ version.
You can get the cluster ID with the list of clusters in the folder.
-
-
To upgrade your Python version, run this request:
curl \ --request PATCH \ --header "Authorization: Bearer $IAM_TOKEN" \ --header "Content-Type: application/json" \ --url 'https://airflow.api.cloud.yandex.net/managed-airflow/v1/clusters/<cluster_ID>' \ --data '{ "updateMask": "pythonVersion", "pythonVersion": "<Python_version>" }'Where:
-
updateMask: List of parameters to update. Specify onlypythonVersion. -
pythonVersion: Target Python version.
You can get the cluster ID with the list of clusters in the folder.
-
-
-
View the server response to make sure your request was successful.
To upgrade your Apache Airflow™ or Python version:
-
Get an IAM token for API authentication and put it into an environment variable:
export IAM_TOKEN="<IAM_token>" -
Clone the cloudapi
repository:cd ~/ && git clone --depth=1 https://github.com/yandex-cloud/cloudapiBelow, we assume that the repository contents reside in the
~/cloudapi/directory. -
Call the ClusterService/Update method, e.g., via the following gRPCurl
request:Warning
The API method will assign default values to all the parameters of the object you are modifying unless you explicitly provide them in your request. To avoid this, list the settings you want to change in the
update_maskparameter as an array ofpaths[]strings.Format for listing settings
"update_mask": { "paths": [ "<setting_1>", "<setting_2>", ... "<setting_N>" ] }-
To upgrade your Apache Airflow™ version, run this request:
grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/airflow/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "airflow_version" ] }, "airflow_version": "<Apache_Airflow™_version>" }' \ airflow.api.cloud.yandex.net:443 \ yandex.cloud.airflow.v1.ClusterService.UpdateWhere:
-
update_mask: List of parameters to update. Specify onlyairflow_version. -
airflow_version: Target Apache Airflow™ version.
You can get the cluster ID with the list of clusters in the folder.
-
-
To upgrade your Python version, run this request:
grpcurl \ -format json \ -import-path ~/cloudapi/ \ -import-path ~/cloudapi/third_party/googleapis/ \ -proto ~/cloudapi/yandex/cloud/airflow/v1/cluster_service.proto \ -rpc-header "Authorization: Bearer $IAM_TOKEN" \ -d '{ "cluster_id": "<cluster_ID>", "update_mask": { "paths": [ "python_version" ] }, "python_version": "<Python_version>" }' \ airflow.api.cloud.yandex.net:443 \ yandex.cloud.airflow.v1.ClusterService.UpdateWhere:
-
update_mask: List of parameters to update. Specify onlypython_version. -
python_version: Target Python version.
You can get the cluster ID with the list of clusters in the folder.
-
-
-
Check the server response to make sure your request was successful.
Examples
Let's assume you need to upgrade Apache Airflow™ from 2.10 to 2.11, and Python from 3.10 to 3.12.
-
To get a list of clusters with their IDs and names, run this command:
yc managed-airflow cluster list+----------------------+------------+---------------------+--------+---------+ | ID | NAME | CREATED AT | HEALTH | STATUS | +----------------------+------------+---------------------+--------+---------+ | c9qqhh2u3r20******** | airflow411 | 2026-02-26 15:39:33 | ALIVE | RUNNING | +----------------------+------------+---------------------+--------+---------+ -
To get information about the
airflow411cluster, run the following command:yc managed-airflow cluster get airflow411Result:
id: c9qqhh2u3r20******** ... config: ... airflow-version: "2.10" python-version: "3.10" -
To update Apache Airflow™ to version
2.11, run this command:yc managed-airflow cluster update airflow411 \ --airflow-version=2.11Wait for the operation to complete.
-
To update Python to version
3.12, run this command:yc managed-airflow cluster update airflow411 \ --python-version=3.12
-
Open the current Terraform configuration file describing your infrastructure.
-
In the cluster description, set the
airflow_versionfield value to2.11.resource "yandex_airflow_cluster" "<cluster_name>" { ... airflow_version = "2.11" ... } -
Apply the changes:
terraform apply -
Set the
python_versionfield value to3.12:resource "yandex_airflow_cluster" "<cluster_name>" { ... python_version = "3.12" ... } -
Apply the changes once again:
terraform apply