Commit 44381b6
Fix Edge3 provider navigation with webserver base_url configuration (apache#56189)
* Fix Edge3 provider navigation with webserver base_url configuration
The Edge3 provider's BrowserRouter was not respecting the Airflow
webserver.base_url configuration, causing navigation links to generate
absolute paths from root instead of properly prefixed paths. This
resulted in 404 errors when Airflow is deployed with a base URL prefix
(e.g., my_company.com/airflow).
**Problem:**
- Edge3 provider pages were navigating to /plugin/edge_worker instead
of /airflow/plugin/edge_worker
- This broke navigation in deployments where nginx redirects traffic
from my_company.com/airflow to localhost:8080
- The issue was in JobsPage.tsx:94 where RouterLink generated links
without the base URL prefix
* Fix: Added _get_base_url_path() helper function and updated all URLs to use it
* Fix Edge3 provider frontend API calls with webserver base_url configuration
The Edge3 provider's frontend was not respecting Airflow's webserver
base_url configuration, causing API calls to fail when the webserver
was configured with a subpath (e.g., localhost:8080/airflow).
The OpenAPI-generated client was using an empty BASE configuration,
resulting in API calls to /edge_worker/ui/jobs instead of
/airflow/edge_worker/ui/jobs when base_url was set.
This fix initializes OpenAPI.BASE from the HTML <base> tag, following
the same pattern used in Airflow core, ensuring all API calls are
correctly prefixed with the configured base URL path
* Update providers/edge3/src/airflow/providers/edge3/plugins/edge_executor_plugin.py
Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>
---------
Co-authored-by: Jens Scheffler <95105677+jscheffl@users.noreply.github.com>1 parent 0ec6653 commit 44381b6
File tree
5 files changed
+56
-30
lines changed- providers/edge3
- src/airflow/providers/edge3/plugins
- www
- dist
- src
- layouts
5 files changed
+56
-30
lines changedLines changed: 26 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
230 | 246 | | |
231 | 247 | | |
232 | 248 | | |
| |||
237 | 253 | | |
238 | 254 | | |
239 | 255 | | |
240 | | - | |
| 256 | + | |
241 | 257 | | |
242 | 258 | | |
243 | 259 | | |
244 | | - | |
245 | | - | |
| 260 | + | |
| 261 | + | |
246 | 262 | | |
247 | 263 | | |
248 | 264 | | |
249 | | - | |
| 265 | + | |
250 | 266 | | |
251 | 267 | | |
252 | | - | |
253 | | - | |
| 268 | + | |
| 269 | + | |
254 | 270 | | |
255 | 271 | | |
256 | 272 | | |
257 | 273 | | |
258 | 274 | | |
259 | | - | |
| 275 | + | |
260 | 276 | | |
261 | 277 | | |
262 | | - | |
263 | | - | |
| 278 | + | |
| 279 | + | |
264 | 280 | | |
265 | 281 | | |
266 | 282 | | |
| |||
271 | 287 | | |
272 | 288 | | |
273 | 289 | | |
274 | | - | |
| 290 | + | |
275 | 291 | | |
276 | 292 | | |
277 | 293 | | |
| |||
Lines changed: 18 additions & 18 deletions
Large diffs are not rendered by default.
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | | - | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments