Skip to content

Conversation

@Lohith625
Copy link
Contributor


This PR updates the documentation in howto/customize-ui.rst to reflect the correct import path and usage of the UIAlert class for Airflow v3.

Previously, the documentation showed:

from airflow.www.utils import UIAlert

DASHBOARD_UIALERTS = [
    UIAlert("Welcome to Airflow"),
]

In Airflow v3, UIAlert has moved to the airflow.api_fastapi.common.types module and requires keyword arguments text and category.

The updated example is:

from airflow.api_fastapi.common.types import UIAlert

DASHBOARD_UIALERTS = [
    UIAlert(text="Welcome to Airflow", category="info"),
]

@Lohith625
Copy link
Contributor Author

Hi @lp-jump 👋
I’ve updated the UIAlert example in howto/customize-ui.rst as suggested.
While reviewing the docs, I also noticed a few other occurrences of airflow.www.utils in different sections.
Would you like me to update those as well to align with the v3 structure, or should we keep this PR limited to just the UIAlert example?

Happy to make the additional changes if needed. 😊

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for that.

@pierrejeambrun pierrejeambrun added this to the Airflow 3.1.4 milestone Nov 20, 2025
@pierrejeambrun pierrejeambrun added the type:doc-only Changelog: Doc Only label Nov 20, 2025
@pierrejeambrun
Copy link
Member

pierrejeambrun commented Nov 20, 2025

While reviewing the docs, I also noticed a few other occurrences of airflow.www.utils in different sections.

Yes please, it would be great if you could update all occurrences in customize-ui.rst so that it does not reference this missing class anymore.

There is also one occurence of such import in chart/values.yaml but we shouldn't modify it. (it's airflow 2 code which is expected)

@Lohith625
Copy link
Contributor Author

Hi @pierrejeambrun 👋
I have updated all occurrences of airflow.www.utils and deprecated UIAlert usage inside customize-ui.rst, as requested.

I did not modify the import inside chart/values.yaml because it is Airflow 2 code, following your note.

Please let me know if any further updates are needed. 😊

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we are missing line 124 too, otherwise looking good to me.

@Lohith625
Copy link
Contributor Author

I think we are missing line 124 too, otherwise looking good to me.

Thanks for pointing that out. I’ve now updated the line at 124 as well.
Please let me know if any other adjustments are needed.

Copy link
Member

@pierrejeambrun pierrejeambrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pierrejeambrun pierrejeambrun added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Dec 1, 2025
@pierrejeambrun pierrejeambrun merged commit 8545d3c into apache:main Dec 1, 2025
65 checks passed
github-actions bot pushed a commit that referenced this pull request Dec 1, 2025
#58090)

* Docs: update UIAlert import path and usage for v3 (#58089)

* fix:update all uialert import references for v3

* update uialert docs
(cherry picked from commit 8545d3c)

Co-authored-by: Lohith M <152604836+Lohith625@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

github-actions bot pushed a commit to aws-mwaa/upstream-to-airflow that referenced this pull request Dec 1, 2025
…#58089) (apache#58090)

* Docs: update UIAlert import path and usage for v3 (apache#58089)

* fix:update all uialert import references for v3

* update uialert docs
(cherry picked from commit 8545d3c)

Co-authored-by: Lohith M <152604836+Lohith625@users.noreply.github.com>
pierrejeambrun pushed a commit that referenced this pull request Dec 1, 2025
#58090) (#58891)

* Docs: update UIAlert import path and usage for v3 (#58089)

* fix:update all uialert import references for v3

* update uialert docs
(cherry picked from commit 8545d3c)

Co-authored-by: Lohith M <152604836+Lohith625@users.noreply.github.com>
ephraimbuddy pushed a commit that referenced this pull request Dec 3, 2025
#58090) (#58891)

* Docs: update UIAlert import path and usage for v3 (#58089)

* fix:update all uialert import references for v3

* update uialert docs
(cherry picked from commit 8545d3c)

Co-authored-by: Lohith M <152604836+Lohith625@users.noreply.github.com>
RoyLee1224 pushed a commit to RoyLee1224/airflow that referenced this pull request Dec 3, 2025
…che#58090)

* Docs: update UIAlert import path and usage for v3 (apache#58089)

* fix:update all uialert import references for v3

* update uialert docs
Copilot AI pushed a commit to jason810496/airflow that referenced this pull request Dec 5, 2025
…che#58090)

* Docs: update UIAlert import path and usage for v3 (apache#58089)

* fix:update all uialert import references for v3

* update uialert docs
itayweb pushed a commit to itayweb/airflow that referenced this pull request Dec 6, 2025
…che#58090)

* Docs: update UIAlert import path and usage for v3 (apache#58089)

* fix:update all uialert import references for v3

* update uialert docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch kind:documentation type:doc-only Changelog: Doc Only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants