Skip to content

Commit bb25ae1

Browse files
committed
for 3.x: only scheduler updates FAB permissions and restrict workers
1 parent 675a70b commit bb25ae1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

rust/operator-binary/src/env_vars.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,29 @@ fn add_version_specific_env_vars(
477477
..Default::default()
478478
},
479479
);
480+
// Sometimes a race condition can arise when both scheduler and
481+
// api-server are updating the DB, which adds overhead (conflicts
482+
// are logged) and can result in inconsistencies. This setting
483+
// ensure that only the scheduler will do this by default.
484+
env.insert(
485+
"AIRFLOW__FAB__UPDATE_FAB_PERMS".into(),
486+
EnvVar {
487+
name: "AIRFLOW__FAB__UPDATE_FAB_PERMS".into(),
488+
value: Some("False".into()),
489+
..Default::default()
490+
},
491+
);
492+
// Airflow 3.x uses fast-api as a backend: newer versions of uvicorn can
493+
// cause issues with child processes. See discussion here: <https://github.com/apache/airflow/discussions/50170#discussioncomment-13265000>.
494+
// This will be considered as part of this issue: <https://github.com/stackabletech/airflow-operator/issues/641>.
495+
env.insert(
496+
"AIRFLOW__API__WORKERS".into(),
497+
EnvVar {
498+
name: "AIRFLOW__API__WORKERS".into(),
499+
value: Some("1".into()),
500+
..Default::default()
501+
},
502+
);
480503
} else {
481504
env.insert(
482505
AIRFLOW_API_AUTH_BACKENDS.into(),

0 commit comments

Comments
 (0)