Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,9 @@ class DagAccessEntity(Enum):
CODE = "CODE"
DEPENDENCIES = "DEPENDENCIES"
RUN = "RUN"
SLA_MISS = "SLA_MISS"
TASK = "TASK"
TASK_INSTANCE = "TASK_INSTANCE"
TASK_LOGS = "TASK_LOGS"
TASK_RESCHEDULE = "TASK_RESCHEDULE"
VERSION = "VERSION"
WARNING = "WARNING"
XCOM = "XCOM"
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,18 @@ def test_batch_is_authorized_dag(
]
+ [
{"method": "GET", "details": DagDetails(id="dag_1"), "access_entity": dag_access_entity}
for dag_access_entity in DagAccessEntity
for dag_access_entity in (
DagAccessEntity.AUDIT_LOG,
DagAccessEntity.CODE,
DagAccessEntity.DEPENDENCIES,
DagAccessEntity.RUN,
DagAccessEntity.TASK,
DagAccessEntity.TASK_INSTANCE,
DagAccessEntity.TASK_LOGS,
DagAccessEntity.VERSION,
DagAccessEntity.WARNING,
DagAccessEntity.XCOM,
)
],
user=mock,
)
Expand Down Expand Up @@ -518,11 +529,9 @@ def test_batch_is_authorized_dag(
DagAccessEntity.CODE.value,
DagAccessEntity.DEPENDENCIES.value,
DagAccessEntity.RUN.value,
DagAccessEntity.SLA_MISS.value,
DagAccessEntity.TASK.value,
DagAccessEntity.TASK_INSTANCE.value,
DagAccessEntity.TASK_LOGS.value,
DagAccessEntity.TASK_RESCHEDULE.value,
DagAccessEntity.VERSION.value,
DagAccessEntity.WARNING.value,
DagAccessEntity.XCOM.value,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@
RESOURCE_PLUGIN,
RESOURCE_POOL,
RESOURCE_PROVIDER,
RESOURCE_SLA_MISS,
RESOURCE_TASK_INSTANCE,
RESOURCE_TASK_LOG,
RESOURCE_TASK_RESCHEDULE,
RESOURCE_TRIGGER,
RESOURCE_VARIABLE,
RESOURCE_WEBSITE,
Expand Down Expand Up @@ -127,7 +125,6 @@
DagAccessEntity.CODE: (RESOURCE_DAG_CODE,),
DagAccessEntity.DEPENDENCIES: (RESOURCE_DAG_DEPENDENCIES,),
DagAccessEntity.RUN: (RESOURCE_DAG_RUN,),
DagAccessEntity.SLA_MISS: (RESOURCE_SLA_MISS,),
# RESOURCE_TASK_INSTANCE has been originally misused. RESOURCE_TASK_INSTANCE referred to task definition
# AND task instances without making the difference
# To be backward compatible, we translate DagAccessEntity.TASK_INSTANCE to RESOURCE_TASK_INSTANCE AND
Expand All @@ -136,7 +133,6 @@
DagAccessEntity.TASK: (RESOURCE_TASK_INSTANCE,),
DagAccessEntity.TASK_INSTANCE: (RESOURCE_DAG_RUN, RESOURCE_TASK_INSTANCE),
DagAccessEntity.TASK_LOGS: (RESOURCE_TASK_LOG,),
DagAccessEntity.TASK_RESCHEDULE: (RESOURCE_TASK_RESCHEDULE,),
DagAccessEntity.VERSION: (RESOURCE_DAG_VERSION,),
DagAccessEntity.WARNING: (RESOURCE_DAG_WARNING,),
DagAccessEntity.XCOM: (RESOURCE_XCOM,),
Expand Down
1 change: 0 additions & 1 deletion providers/fab/tests/unit/fab/www/test_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ def test_has_access_with_details_when_unauthorized(
@pytest.mark.parametrize(
"dag_access_entity",
[
DagAccessEntity.SLA_MISS,
DagAccessEntity.XCOM,
DagAccessEntity.RUN,
DagAccessEntity.TASK_INSTANCE,
Expand Down
Loading