From de1644eb7d8c9d67f419cb2708cb41edac2c9ea0 Mon Sep 17 00:00:00 2001 From: Dmytro Kulyk <34435869+KulykDmytro@users.noreply.github.com> Date: Fri, 7 May 2021 16:20:09 +0300 Subject: [PATCH] Enable Airflow 2.0 compatibility Forced `RBAC` to `True` --- airflow_prometheus_exporter/prometheus_exporter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airflow_prometheus_exporter/prometheus_exporter.py b/airflow_prometheus_exporter/prometheus_exporter.py index 232d458..bcb539f 100644 --- a/airflow_prometheus_exporter/prometheus_exporter.py +++ b/airflow_prometheus_exporter/prometheus_exporter.py @@ -6,7 +6,7 @@ from airflow.configuration import conf from airflow.models import DagModel, DagRun, TaskInstance, TaskFail, XCom from airflow.plugins_manager import AirflowPlugin -from airflow.settings import RBAC, Session +from airflow.settings import Session from airflow.utils.state import State from airflow.utils.log.logging_mixin import LoggingMixin from flask import Response @@ -18,6 +18,7 @@ from airflow_prometheus_exporter.xcom_config import load_xcom_config CANARY_DAG = "canary_dag" +RBAC = "True" @contextmanager