Skip to content

Support Airflow v3 run_after field and simplify DAG run table#589

Open
jvanbuel wants to merge 1 commit intomainfrom
claude/simplify-dagrun-columns-vSFtb
Open

Support Airflow v3 run_after field and simplify DAG run table#589
jvanbuel wants to merge 1 commit intomainfrom
claude/simplify-dagrun-columns-vSFtb

Conversation

@jvanbuel
Copy link
Owner

Summary

This PR adds support for Airflow v3's run_after field while maintaining backward compatibility with Airflow v2's logical_date. It also simplifies the DAG run display table by removing the DAG Run ID column and consolidating date display.

Key Changes

  • Added run_after field support: The DagRun struct now includes an optional run_after field to support Airflow v3, with a new display_date() method that prefers run_after over logical_date for display and sorting purposes.

  • Simplified table layout: Removed the dedicated "DAG Run ID" column from the table display, reducing visual clutter while keeping the information accessible through the state indicator and other context.

  • Improved date handling: The sorting logic now uses display_date() which intelligently selects between run_after (v3), logical_date (v2), and start_date as fallback, ensuring correct chronological ordering across Airflow versions.

  • Updated table constraints: Adjusted column width calculations to account for the removed DAG Run ID column, improving space allocation for the duration gauge.

  • Enhanced test coverage: Added a new test case test_sort_dag_runs_prefers_run_after() to verify that run_after takes precedence over logical_date when both are present.

  • Cleaned up imports: Removed unused Modifier import from ratatui style module.

Implementation Details

The display_date() method provides a clean abstraction for date selection, making it easy to handle the transition between Airflow versions. The sorting implementation now uses this method consistently, ensuring that runs are always ordered by the most meaningful date available. The table layout changes maintain the same visual hierarchy while reducing cognitive load by focusing on essential information.

https://claude.ai/code/session_01Ntp6UzeBVp78XaMQm1rS21

The DAG Run ID column encoded the same information as the logical date
and run type columns, making it redundant. This removes it and replaces
the "Logical Date" column with a unified "Date" column that prefers
`run_after` (Airflow v3) over `logical_date` (Airflow v2), handling
the semantic change where `logical_date` can be None for manually
triggered runs in v3.

https://claude.ai/code/session_01Ntp6UzeBVp78XaMQm1rS21
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 21, 2026

Warning

Rate limit exceeded

@jvanbuel has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 46 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/simplify-dagrun-columns-vSFtb

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants