Problem:

The client reported that their Apache Airflow Scheduler pod was not automatically detecting updates from a Persistent Volume Claim (PVC) named airflow-dags. Meanwhile, a related airflow-triggerer pod using the same PVC was updating files as expected. To temporarily resolve the issue, the client had to manually restart (“bounce”) the scheduler pod to force it to recognize new files.

Process:

Step 1: Initial Analysis

The expert reviewed the client’s environment and recommended initial troubleshooting steps. These included restarting the scheduler pod to remount the PVC, adjusting Airflow configuration parameters related to file caching and timeouts, running airflow db upgrade to check for database issues, and removing or relocating .pyc files that could cause caching conflicts.

Despite these efforts, the issue persisted, indicating that the root cause was likely a bug in the specific Airflow versions the client was using (2.9.3 and 2.7.1 in production).

Step 2: Evaluation of Solutions

The expert analyzed Airflow release notes and identified that this file-detection issue had been resolved in later versions. The recommendation was to upgrade to Airflow 2.10.0 or higher to address the underlying bug.

The client initially had concerns due to internal product constraints but proceeded with an upgrade to version 2.10.4 in a non-production environment. The development and QA teams validated the new version and prepared a rollout plan for production.

Step 3: Solution Implementation

The expert guided the client through upgrading Apache Airflow to version 2.10.4. This version corrected the scheduler’s inability to detect new files automatically, eliminating the need for manual pod restarts. The upgraded system also included the latest bug fixes and enhancements, improving overall stability.

Solution:

The expert recommended upgrading Apache Airflow to version 2.10.0 or higher, based on the analysis that the
issue was likely a known bug in older versions resolved in a later release. The client was initially hesitant
due to internal product constraints but proceeded to upgrade to version 2.10.4 in a non-production environment.
The development and QA teams validated the new version and planned a production rollout.

Conclusion:

Upgrading Apache Airflow addressed the root cause: a version-specific bug preventing the scheduler from
correctly detecting and loading new files. By moving to a more stable, updated version, the client eliminated
manual workarounds like pod restarts and improved the overall stability and reliability of their data workflow
system with the latest bug fixes and enhancements.