Skip to content

Add has_note key to the Grid Runs API response - #69121

Merged
bbovenzi merged 8 commits into
apache:mainfrom
jayachandrakasarla:add-has-note-key-to-grid-runs
Jul 9, 2026
Merged

Add has_note key to the Grid Runs API response#69121
bbovenzi merged 8 commits into
apache:mainfrom
jayachandrakasarla:add-has-note-key-to-grid-runs

Conversation

@jayachandrakasarla

Copy link
Copy Markdown
Contributor

Closes #68615

This is a follow up pull request for #68979

Added has_note key to get_grid_runs() response. Here's the screenshot of the response object:

image

@jayachandrakasarla

jayachandrakasarla commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

@pierrejeambrun raised this PR as we discussed about it here, please review it and let me know if I need to make any changes. Thanks!

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good thanks.

Can you do the small UI tweak necessary so we can see the gradient as well on the dag run bar in the grid, in here similarly. (top right corner of the vertical bar representing the dag run should show a similar color gradient)

Image

@jayachandrakasarla

Copy link
Copy Markdown
Contributor Author

@pierrejeambrun done, this is how it looks now. Please let me know if I should adjust the size of the gradient.

image image

@jayachandrakasarla

Copy link
Copy Markdown
Contributor Author

@pierrejeambrun could you please review this PR?

@potiuk
potiuk requested a review from henry3260 as a code owner July 2, 2026 15:38

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Small glitch, depending on the run height, the gradient isn't really visible:

Image

Also one small comment bellow before we can merge.

Comment thread airflow-core/src/airflow/ui/src/layouts/Details/Grid/Bar.tsx Outdated
@jayachandrakasarla

Copy link
Copy Markdown
Contributor Author

@pierrejeambrun changed NOTE_GRADIENT to use pixels instead of percentage and moved it constants.ts. This is how it looks now:

image

@jayachandrakasarla

Copy link
Copy Markdown
Contributor Author

@pierrejeambrun could you please review this? I've made the required changes. Thanks!

@aaron-y-chen aaron-y-chen 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.

Nice PR!

Comment thread airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py Outdated
@henry3260

Copy link
Copy Markdown
Contributor

Rebase to trigger CI

@henry3260
henry3260 force-pushed the add-has-note-key-to-grid-runs branch from 11945f0 to 547fcd6 Compare July 9, 2026 14:18

@henry3260 henry3260 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.

Overall LGTM

If I understand right, we should add has_note in

const makeRun = (runId: string): GridRunsResponse => ({
dag_id: "my_dag",
duration: 0,
end_date: null,
has_missed_deadline: false,
queued_at: null,
run_after: "2024-01-01T00:00:00Z",
run_id: runId,
run_type: "manual",
start_date: null,
state: "success",
});

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM thanks. Tested and working as expected.

@pierrejeambrun pierrejeambrun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I meant to approve

Comment thread airflow-core/src/airflow/api_fastapi/core_api/routes/ui/grid.py
@henry3260

henry3260 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Not sure why the "Approve and run" button disappeared 🤔
image

@henry3260
henry3260 force-pushed the add-has-note-key-to-grid-runs branch from 689ada8 to 75b73fa Compare July 9, 2026 15:01
@bbovenzi

bbovenzi commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

We have some linting errors. pnpm lint --fix && pnpm format should help

@jayachandrakasarla

Copy link
Copy Markdown
Contributor Author

We have some linting errors. pnpm lint --fix && pnpm format should help

It was because of missing has_note attribute in makeRun function in useGridPagination.test.ts. I've added and pushed it.

@bbovenzi bbovenzi added this to the Airflow 3.3.1 milestone Jul 9, 2026
@bbovenzi
bbovenzi merged commit 6627054 into apache:main Jul 9, 2026
2 checks passed
@jayachandrakasarla
jayachandrakasarla deleted the add-has-note-key-to-grid-runs branch July 10, 2026 01:36
vatsrahul1001 added a commit that referenced this pull request Aug 3, 2026
* Added has_note attribute to get_grid_runs() response

* Added tests for has_note

* Added note gradient to Bar.tsx to render saved note indicator for a dag run

* Modified NOTE_GRADIENT to render constant size note indicator

* modified note gradient comment in constants.ts

* Added null check for DagRun note content

* Added saved note content check for TaskInstanceNote subq

* Added has_note to makeRun in useGridPagination.test.ts

(cherry picked from commit 6627054)

Co-authored-by: Jayachandra Kasarla <jayachandra.kasarla@astronomer.io>
vatsrahul1001 added a commit that referenced this pull request Aug 5, 2026
* Added has_note attribute to get_grid_runs() response

* Added tests for has_note

* Added note gradient to Bar.tsx to render saved note indicator for a dag run

* Modified NOTE_GRADIENT to render constant size note indicator

* modified note gradient comment in constants.ts

* Added null check for DagRun note content

* Added saved note content check for TaskInstanceNote subq

* Added has_note to makeRun in useGridPagination.test.ts

(cherry picked from commit 6627054)

Co-authored-by: Jayachandra Kasarla <jayachandra.kasarla@astronomer.io>
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 area:UI Related to UI/UX. For Frontend Developers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reintroduce visual indicator of a note on a Dag-run/ Task-instance

6 participants