1fanwang opened a new pull request, #71581:
URL: https://github.com/apache/airflow/pull/71581

   `Logs.test.tsx` crossed eslint's 500-line `max-lines` limit when #71270 
added a
   76-line describe block, so static checks now fail on any PR whose merge ref 
is
   recomputed against main:
   
   ```
   src/pages/TaskInstance/Logs/Logs.test.tsx
     779:1  error  File has too many lines (539). Maximum allowed is 500  
max-lines
   ```
   
   Main's own CI has not run since that merge, so the breakage is still latent 
there.
   
   The copy and selection cases are self-contained — they share only 
`ITEM_HEIGHT`,
   the `beforeAll` offset stubs, and `waitForLogs` — so they move to their own 
file
   alongside the other per-concern test files already in that directory
   (`logSelection.test.ts`, `logDownloadContent.test.ts`, 
`LogSearchInput.test.tsx`).
   No test body changed; `vi` is dropped from the imports it no longer has a 
user in.
   
   related: https://github.com/apache/airflow/pull/71270
   
   # Testing Done
   
   | # | Scenario | Result |
   |---|---|---|
   | 1 | eslint on the pre-split file | Reproduces CI's `max-lines` error |
   | 2 | eslint on both files after the split | Clean |
   | 3 | `ts-compile-lint-ui` prek hook (what CI runs) | Passed |
   | 4 | vitest on both files | 23 passed, matching the 23 before the split |
   | 5 | Reconstructing the original from the two files | Byte-identical |
   
   <details><summary>Raw logs</summary>
   
   ```console
   $ pnpm eslint src/pages/TaskInstance/Logs/Logs.test.tsx   # pre-split
   /…/src/pages/TaskInstance/Logs/Logs.test.tsx
     779:1  error  File has too many lines (539). Maximum allowed is 500  
max-lines
   
   ✖ 1 problem (1 error, 0 warnings)
   
   $ pnpm eslint src/pages/TaskInstance/Logs/Logs.test.tsx \
                 src/pages/TaskInstance/Logs/LogsSelection.test.tsx
   eslint exit=0
   
   $ prek run ts-compile-lint-ui --files …/Logs.test.tsx 
…/LogsSelection.test.tsx
   Running hooks for `airflow-core`:
   Compile / format / lint 
UI...............................................Passed
   
   $ pnpm vitest run src/pages/TaskInstance/Logs/Logs.test.tsx \
                     src/pages/TaskInstance/Logs/LogsSelection.test.tsx
    Test Files  2 passed (2)
         Tests  23 passed (23)
   ```
   
   The split is a pure move. Rebuilding the original file from the two new ones 
and
   diffing against `origin/main` reports no difference:
   
   ```console
   $ diff /tmp/orig.tsx /tmp/recon.tsx
   RECONSTRUCTION IDENTICAL — split moved code verbatim, no edits to test bodies
   ```
   
   </details>
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to