potiuk commented on code in PR #44454:
URL: https://github.com/apache/airflow/pull/44454#discussion_r1864303473


##########
providers/src/airflow/providers/edge/cli/edge_command.py:
##########
@@ -59,29 +57,6 @@
 )
 
 
-@providers_configuration_loaded
-def force_use_internal_api_on_edge_worker():
-    """
-    Ensure that the environment is configured for the internal API without 
needing to declare it outside.
-
-    This is only required for an Edge worker and must to be done before the 
Click CLI wrapper is initiated.
-    That is because the CLI wrapper will attempt to establish a DB connection, 
which will fail before the
-    function call can take effect. In an Edge worker, we need to "patch" the 
environment before starting.
-    """
-    if "airflow" in sys.argv[0] and sys.argv[1:3] == ["edge", "worker"]:
-        api_url = conf.get("edge", "api_url")
-        if not api_url:
-            raise SystemExit("Error: API URL is not configured, please correct 
configuration.")
-        logger.info("Starting worker with API endpoint %s", api_url)
-        # export Edge API to be used for internal API
-        os.environ["AIRFLOW_ENABLE_AIP_44"] = "True"
-        os.environ["AIRFLOW__CORE__INTERNAL_API_URL"] = api_url
-        InternalApiConfig.set_use_internal_api("edge-worker")

Review Comment:
   See https://github.com/apache/airflow/pull/44494#issuecomment-2509010130 
   
   I think we are technically at the FORK time. This is the time when we know 
Edge executor in main will not work in 2.10. And if you need to make it works, 
forking from "just before we started to remove AIP-44" by Bosh team and 
backporting the `main` changes to edge executor to make it works for "2.10" 
version maintained by Bosh is the right thing to do.



-- 
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