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

   ## Summary
   
   Fixes three pre-existing bugs in v3-2-test's `BulkTaskInstanceService` that
   manifest as reproducible CI failures of:
   
   - 
`TestBulkTaskInstances::test_bulk_update_mapped_task_instance_state_is_persisted`
   - 
`TestBulkTaskInstances::test_bulk_task_instances_rejects_unauthorized_dag_ids_from_request_body`
   
   These tests fail on every PR opened against v3-2-test as well as on direct
   v3-2-test pushes — they're not flakes, they're real bugs.
   
   The bugs:
   
   1. `_perform_update` did not pass `map_index` to 
`_patch_ti_validate_request`,
      so the validation step looked up the wrong TI (default `map_index=-1`)
      and persistence silently no-op'd for mapped task instances.
   2. `specific_entity_map` / `all_map_entity_map` used raw `(entity.dag_id, 
...)`
      tuples as keys — but when `dag_id`/`dag_run_id` come from the path rather
      than the body, those attributes are `None` on the entity. Meanwhile keys
      from `_categorize_entities` are resolved via `_extract_task_identifiers`,
      so dict lookups missed and `_perform_update` was never called — empty
      `response.update.success`.
   3. `action_name=action.action` rendered as `'BulkAction.UPDATE'` /
      `'BulkAction.DELETE'` in authorization error messages because Python
      str-enum `__format__` returns the repr, not the value. Use `.value`.
   
   All three fixes already exist on main. This is the minimal diff to bring
   v3-2-test in line with main for this file.
   
   Also includes regenerated `_private_ui.yaml`, `schemas.gen.ts`, and
   `types.gen.ts`: the prek `generate-openapi-spec` hook caught a pre-existing
   description drift on `ExtraMenuItem` that is unrelated to the bug fixes
   but had to land alongside the source change.
   
   ## Test plan
   
   - [ ] CI runs 
`TestBulkTaskInstances::test_bulk_update_mapped_task_instance_state_is_persisted`
 — should pass
   - [ ] CI runs 
`TestBulkTaskInstances::test_bulk_task_instances_rejects_unauthorized_dag_ids_from_request_body`
 — should pass
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.7, 1M context)
   
   Generated-by: Claude Code (Opus 4.7, 1M context) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
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