Skip to content

Draft: Use keyset for Airflow DAGs pagination

Fred de Gier requested to merge refactor/airflow-use-keyset into master

What does this MR do and why?

This MR replaces traditional pagination with keyset pagination.

Closes #390047 (closed)

Describe in detail what your merge request does and why.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Choose a project (in this case FlightJS) and enable the feature flag
project = Project.find(7)
Feature.enable(:airflow_dags, project)
  1. Navigate to http://127.0.0.1:3000/flightjs/Flight/-/airflow/dags and verify the table is empty
  2. Populate the table
[*1..20].each { |n|  ::Airflow::Dags.create :project_id => project.id, :has_import_errors => false, :is_active => false, :is_paused => true, :next_run => "2023-03-01 00:00:00", :dag_name => "Dag number %s" % n, :schedule => "Manual", :fileloc => "/opt/dag.py" }
  1. Navigate to http://127.0.0.1:3000/flightjs/Flight/-/airflow/dags and verify the table has records and pagination is present

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Fred de Gier

Merge request reports