kaxil opened a new pull request, #75522: URL: https://github.com/apache/airflow/pull/75522
The AI Model and HITL Review tabs render empty when the browser reaches Airflow on a different origin than `[api] base_url` names, for example through a local development proxy while `base_url` is `http://localhost:8080`. `get_bundle_url` copied the scheme and host of `base_url` into each plugin's `bundle_url`, so the browser imported the bundle from that other origin and the import failed: a CORS error when something answers there, connection refused when nothing does. `get_bundle_url` now returns only the path, as the Edge3 plugin already does. The core UI likewise builds its own URLs from the request path, not from `base_url`. **The absolute URL is no longer needed for Vite dev mode.** It was added so the bundle loaded from core's Vite dev server, where `import()` resolved relative to the dev server's origin. Since #66618 (Airflow 3.3.0) the host resolves `bundle_url` against `document.baseURI` (`ReactPlugin.tsx`), so a path loads there too. Vite dev mode only runs from `main`, and a built UI on any version resolves a path against the page's origin, which the Edge3 plugin relies on. Before and after, with `base_url = http://localhost:8080` and the UI opened on another port:   --- * Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. Note: commit author/co-author name and email in commits become permanently public when merged. * For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed. * When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). * For significant user-facing changes create newsfragment: `{pr_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). You can add this file in a follow-up commit after the PR is created so you know the PR number. -- 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]
