Airflow xcom_pull returns None on branched upstream tasks
Pulling XCom values from an Airflow task whose upstream uses BranchPythonOperator or similar conditional branching.
When xcom_pull(task_ids='skipped_branch') is called on a task whose upstream was NOT taken (trigger_rule='all_success' skipped it), Airflow returns None silently — no warning. Downstream code that expects a dict/list then blows up with errors far from the actual cause. Two fixes: (1) set trigger_rule='none_failed_min_one_success' on the joining task so it survives a skipped upstream branch; (2) accept a list in the join — xcom_pull(task_ids=[...]) returns a list aligned with the input order, letting you filter out Nones explicitly.
Any DAG with a BranchPythonOperator upstream of an xcom_pull — assume at least one pull WILL return None. Guard before indexing, and pick the downstream trigger_rule consciously.