cetingokhan commented on issue #58724:
URL: https://github.com/apache/airflow/issues/58724#issuecomment-3910856648

   Hi everyone,
   
   I can confirm that this issue is resolved in Airflow 3.1.4. I have tested 
the fix provided in PR #58621 and everything is working as expected.
   
   For those who are still on v3.1.3 and cannot upgrade immediately, here is 
the technical breakdown of the issue and a workaround:
   
   The Problem:
   The error occurs when the EnvironmentVariablesBackend cannot find the 
variable and the lookup falls back to ExecutionAPISecretsBackend. At this 
point, it fails with:
   ImportError: cannot import name 'SUPERVISOR_COMMS' from 
'airflow.sdk.execution_time.task_runner'
   
   Workaround for v3.1.3:
   To bypass this error until you upgrade, you can manually set the variables 
as environment variables. Since EnvironmentVariablesBackend is checked first, 
it successfully retrieves the value and prevents the execution flow from 
reaching the faulty ExecutionAPISecretsBackend import.
   
   Conclusion:
   Upgrading to v3.1.4 is the recommended solution as it natively fixes the 
task runner import issue.
   
   Thanks to everyone involved in the fix!
   
   
   ```
   virtualenv_task = PythonVirtualenvOperator(
           task_id="virtualenv_python",
           python_callable=my_virtualenv_function,
           requirements=[],
           env_vars={"AIRFLOW_VAR_XXXX": Variable.get("xxxx", default="{}", 
deserialize_json=False)}
       )
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to