Skip to content

Swagger UI for FAB is broken #46652

@jedcunningham

Description

@jedcunningham

Apache Airflow version

main (development)

If "Other Airflow 2 version" selected, which one?

No response

What happened?

When going to the swagger ui for the FAB provider at /auth/fab/v1/ui/, we get a 500:

[2025-02-11T11:32:00.933-0700] {app.py:1744} ERROR - Exception on /auth/fab/v1/ui/ [GET]
Traceback (most recent call last):
  File "/Users/jedc/github/airflow/.venv/lib/python3.12/site-packages/flask/app.py", line 2529, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedc/github/airflow/.venv/lib/python3.12/site-packages/flask/app.py", line 1825, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedc/github/airflow/.venv/lib/python3.12/site-packages/flask/app.py", line 1823, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedc/github/airflow/.venv/lib/python3.12/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedc/github/airflow/.venv/lib/python3.12/site-packages/connexion/apis/flask_api.py", line 308, in console_ui_home
    return flask.render_template_string(index_path.read_text(), **template_variables)
                                        ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedc/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/pathlib.py", line 1027, in read_text
    with self.open(mode='r', encoding=encoding, errors=errors) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jedc/.local/share/uv/python/cpython-3.12.7-macos-aarch64-none/lib/python3.12/pathlib.py", line 1013, in open
    return io.open(self, mode, buffering, encoding, errors, newline)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/Users/jedc/github/airflow/providers/fab/src/airflow/providers/fab/www/static/dist/swagger-ui/index
.j2'

What you think should happen instead?

No response

How to reproduce

Start up the FAB api with the FAB auth manager, and go to /auth/fab/v1/ui.

Operating System

macos

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

area:UIRelated to UI/UX. For Frontend Developers.kind:bugThis is a clearly a bugprovider:fab

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions