You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Codingaditya17 (via GitHub)" <gi...@apache.org> on 2026/05/26 12:53:28 UTC

[PR] Fix None child state rendering in UI [airflow]

Codingaditya17 opened a new pull request, #67552:
URL: https://github.com/apache/airflow/pull/67552

   ### Summary
   
   This PR fixes rendering for serialized `None` child state keys in the UI.
   
   The grid API can return child states like `{"None": 2, "success": 1}`. Before this change, the UI used the raw `None` key directly for Chakra color tokens and translations, producing `None.solid` and `common:states.None`.
   
   This change adds small state normalization helpers and applies them to the two direct `child_states` render sites:
   
   - `SegmentedStateBar.tsx`
   - `TaskInstanceTooltip.tsx`
   
   ### Scope
   
   This PR intentionally only fixes the direct child state breakdown/rendering issue described in #67541. It does not change the dominant state logic handled separately in #67543.
   
   ### Tests
   
   ```bash
   pnpm vitest run src/utils/stateUtils.test.ts src/components/TaskInstanceTooltip.test.tsx
   
   
   
   Test Files  2 passed (2)
   Tests       21 passed (21)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix None child state rendering in UI [airflow]

Posted by "henry3260 (via GitHub)" <gi...@apache.org>.
henry3260 commented on PR #67552:
URL: https://github.com/apache/airflow/pull/67552#issuecomment-4583255970

   > Thanks for the review and approval. I checked the remaining failed job, and it appears unrelated to this PR.
   > 
   > The only failing check is `Tests (AMD) / provider distributions tests / Compat 3.0.6:P3.10`, and the failure is in the provider compatibility test suite, not in the grid API/UI path changed here. This PR only updates `None` child state serialization for the grid API and related UI handling.
   > 
   > The relevant checks for this change are passing, including React UI tests, translation completeness, CodeQL, mergeability, and the grid/API related tests. The `uv.lock` change has also been removed as requested.
   > 
   > Could the failed provider compatibility job be rerun?
   
   You can rebase the branch to trigger the CI :)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix None child state rendering in UI [airflow]

Posted by "Codingaditya17 (via GitHub)" <gi...@apache.org>.
Codingaditya17 commented on PR #67552:
URL: https://github.com/apache/airflow/pull/67552#issuecomment-4569436357

   Thanks for the review and approval. I checked the remaining failed job, and it appears unrelated to this PR.
   
   The only failing check is `Tests (AMD) / provider distributions tests / Compat 3.0.6:P3.10`, and the failure is in the provider compatibility test suite, not in the grid API/UI path changed here. This PR only updates `None` child state serialization for the grid API and related UI handling.
   
   The relevant checks for this change are passing, including React UI tests, translation completeness, CodeQL, mergeability, and the grid/API related tests. The `uv.lock` change has also been removed as requested.
   
   Could the failed provider compatibility job be rerun?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix None child state rendering in UI [airflow]

Posted by "Codingaditya17 (via GitHub)" <gi...@apache.org>.
Codingaditya17 commented on PR #67552:
URL: https://github.com/apache/airflow/pull/67552#issuecomment-4547489650

   Thanks for the review. I updated the PR to move the normalization to the API layer as suggested.
   
   What changed:
   - The grid API now serializes `None` child state keys as `"none"` instead of emitting `"None"`.
   - Updated the grid API response model to allow `"none"` as a child state key.
   - Updated the existing grid API test expectations from `"None"` to `"none"`.
   - Removed the frontend-only `"None"` normalization helpers and restored the UI render sites to use the API-provided state key directly.
   - Added `no_status` in `theme.ts` with the same gray semantic tokens as `none`.
   
   Tests run locally:
   - `uv run pytest airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_grid.py -k "mapped"`  
     Result: `1 passed, 59 deselected`
   - `cd airflow-core/src/airflow/ui && pnpm vitest run src/utils/stateUtils.test.ts src/components/TaskInstanceTooltip.test.tsx`  
     Result: `Test Files 2 passed, Tests 17 passed`
   - `uv run prek run ts-compile-lint-ui --all-files`  
     Result: `Compile / format / lint UI Passed`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix None child state rendering in UI [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi commented on code in PR #67552:
URL: https://github.com/apache/airflow/pull/67552#discussion_r3306282195


##########
uv.lock:
##########


Review Comment:
   Let's remove this uv lock



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix None child state rendering in UI [airflow]

Posted by "Codingaditya17 (via GitHub)" <gi...@apache.org>.
Codingaditya17 commented on PR #67552:
URL: https://github.com/apache/airflow/pull/67552#issuecomment-4583304702

   Thanks, I rebased the branch on latest `upstream/main` and pushed it to retrigger CI.
   
   I also checked the diff before pushing and removed the unrelated `uv.lock` change again, so the PR should only contain the intended grid API/UI changes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix None child state rendering in UI [airflow]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #67552:
URL: https://github.com/apache/airflow/pull/67552#issuecomment-4624852704

   ### Backport successfully created: v3-2-test
   
   Note: As of [Merging PRs targeted for Airflow 3.X](https://github.com/apache/airflow/blob/main/dev/README_AIRFLOW3_DEV.md#merging-prs-targeted-for-airflow-3x)
   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](https://apache-airflow.slack.com/archives/C03G9H97MM2) Slack channel.
   
   <table>
           <tr>
           <th>Status</th>
           <th>Branch</th>
           <th>Result</th>
       </tr>
       <tr>
           <td>✅</td>
           <td>v3-2-test</td>
           <td><a href="https://github.com/apache/airflow/pull/68030"><img src="https://img.shields.io/badge/PR-68030-blue" alt="PR Link"></a></td>
       </tr>
   </table>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix None child state rendering in UI [airflow]

Posted by "Codingaditya17 (via GitHub)" <gi...@apache.org>.
Codingaditya17 commented on PR #67552:
URL: https://github.com/apache/airflow/pull/67552#issuecomment-4584281872

   Thanks, CI is green now after the rebase.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix None child state rendering in UI [airflow]

Posted by "bbovenzi (via GitHub)" <gi...@apache.org>.
bbovenzi merged PR #67552:
URL: https://github.com/apache/airflow/pull/67552


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix None child state rendering in UI [airflow]

Posted by "Codingaditya17 (via GitHub)" <gi...@apache.org>.
Codingaditya17 commented on code in PR #67552:
URL: https://github.com/apache/airflow/pull/67552#discussion_r3306338416


##########
uv.lock:
##########


Review Comment:
   Done, removed the `uv.lock` change from the PR. I restored it back to `upstream/main` and re-ran the UI lint hook locally.
   
   `uv run prek run ts-compile-lint-ui --all-files`
   
   Result: `Compile / format / lint UI Passed`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org