Skip to content

Fix log line-number links highlighting - #69293

Merged
bbovenzi merged 2 commits into
apache:mainfrom
guan404ming:fix-log-hash-line-mapping
Jul 9, 2026
Merged

Fix log line-number links highlighting#69293
bbovenzi merged 2 commits into
apache:mainfrom
guan404ming:fix-log-hash-line-mapping

Conversation

@guan404ming

Copy link
Copy Markdown
Member

Why

Clicking a line-number link (or opening a URL with #N) highlighted and scrolled to the wrong log line, because the hash line number and the internal entry indexes drift apart whenever log groups or the TaskIdentity preamble are present.

How

  • Carry the displayed line number on each parsed log entry
  • Map line numbers to visible row indexes instead of the misaligned entry-index map
  • Use the same mapping for both the hash highlight and the scroll position

Before

Screen.Recording.2026-07-03.at.11.37.13.AM.mov

After

Screen.Recording.2026-07-03.at.11.36.46.AM.mov

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the 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) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added the area:UI Related to UI/UX. For Frontend Developers. label Jul 3, 2026
@guan404ming
guan404ming force-pushed the fix-log-hash-line-mapping branch 4 times, most recently from c9b811c to 9c035f9 Compare July 8, 2026 05:57
@bbovenzi bbovenzi added this to the Airflow 3.3.1 milestone Jul 8, 2026
@bbovenzi bbovenzi added the backport-to-v3-3-test Backport to v3-3-test label Jul 8, 2026

@bbovenzi bbovenzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great!

Could we add a regression test?

@guan404ming
guan404ming force-pushed the fix-log-hash-line-mapping branch from 9c035f9 to ed9479a Compare July 9, 2026 03:21
@bbovenzi
bbovenzi merged commit 9dec3eb into apache:main Jul 9, 2026
88 checks passed
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

bbovenzi pushed a commit that referenced this pull request Jul 9, 2026
* Fix log line-number links highlighting

* Add regression test for log line-number to visible index mapping
(cherry picked from commit 9dec3eb)

Co-authored-by: Guan-Ming Chiu <105915352+guan404ming@users.noreply.github.com>
vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
* Fix log line-number links highlighting

* Add regression test for log line-number to visible index mapping
(cherry picked from commit 9dec3eb)

Co-authored-by: Guan-Ming Chiu <105915352+guan404ming@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. backport-to-v3-3-test Backport to v3-3-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants