Skip to content

Show user display names for triggered runs and HITL responses - #70836

Merged
uranusjr merged 1 commit into
apache:mainfrom
astronomer:use-display-name-for-user-facing-fields
Aug 3, 2026
Merged

Show user display names for triggered runs and HITL responses#70836
uranusjr merged 1 commit into
apache:mainfrom
astronomer:use-display-name-for-user-facing-fields

Conversation

@pierrejeambrun

Copy link
Copy Markdown
Member

Follow-up to #70583, which added BaseUser.get_display_name and used it so audit-log rows show a friendly user name instead of the raw login.

Several other user-facing fields still recorded get_name() (the raw login):

  • triggering_user_name on manually triggered Dag runs, backfills, and asset materializations — shown in the Dag Runs table and the Run header.
  • The HITL responder name (responded_by) — shown in the HITL table and response form.

These now use get_display_name() too, so what the user sees is consistent with the audit log. For auth managers that don't override get_display_name (Simple, Keycloak) it falls back to get_name, so their behavior is unchanged; FAB users get their full name.

The edge3 worker maintenance-comment site (get_name() embedded in a comment string) is intentionally left out and will be a separate follow-up: that provider can run against an older core without the get_display_name interface, so it needs a hasattr(user, "get_display_name") compatibility guard.


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

PR apache#70583 added BaseUser.get_display_name so audit-log rows could show a friendly user name instead of the raw login. The triggering-user field on manually triggered Dag runs, backfills and asset materializations, and the HITL responder field, still recorded the raw login and so showed it in the UI. Auth managers that do not override get_display_name fall back to get_name, so only richer users such as FAB change.
@boring-cyborg boring-cyborg Bot added the area:API Airflow's REST/HTTP API label Jul 31, 2026
@pierrejeambrun
pierrejeambrun marked this pull request as ready for review July 31, 2026 14:53
@pierrejeambrun pierrejeambrun added the backport-to-v3-3-test Backport to v3-3-test label Jul 31, 2026
@pierrejeambrun pierrejeambrun added this to the Airflow 3.3.1 milestone Jul 31, 2026
@pierrejeambrun

Copy link
Copy Markdown
Member Author

Before

Screenshot 2026-07-31 at 16 55 18 Screenshot 2026-07-31 at 16 56 50 Screenshot 2026-07-31 at 16 57 46

After

Screenshot 2026-07-31 at 16 58 40 Screenshot 2026-07-31 at 16 59 54 Screenshot 2026-07-31 at 16 59 06

@amoghrajesh

Copy link
Copy Markdown
Contributor

Looks simple enough.

@uranusjr

uranusjr commented Aug 3, 2026

Copy link
Copy Markdown
Member

Do we want to backport this? I feel it’s not necessary.

@uranusjr uranusjr removed the backport-to-v3-3-test Backport to v3-3-test label Aug 3, 2026
@uranusjr
uranusjr merged commit 8572ede into apache:main Aug 3, 2026
129 of 136 checks passed
@uranusjr
uranusjr deleted the use-display-name-for-user-facing-fields branch August 3, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants