Repository navigation
Conversation
A pool PATCH with update_mask still had to carry the pool name and include_deferred. So a client that changes only slots, such as airflowctl, has to resend include_deferred and can turn it off by accident. Only default_pool honoured the mask. Signed-off-by: 1fanwang <[email protected]>
1 task done
1 task done
Signed-off-by: 1fanwang <[email protected]>
1fanwang
marked this pull request as ready for review
November 7, 2026 16:40
1fanwang
requested review from
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
jason810496,
pierrejeambrun,
rawwar and
shubhamraj-git
as code owners
November 7, 2026 16:40
Signed-off-by: 1fanwang <[email protected]>
Signed-off-by: 1fanwang <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A client can't change just the slots of a pool. PATCH /api/v2/pools/{pool_name}?update_mask=slots with {"slots": 8} returns 422 because the pool name and include_deferred are still required. A bulk update with the same mask fails too, and only default_pool honours the mask. So clients resend include_deferred every time, and airflowctl pools update --pool etl --slots 16 sends false, which turns deferred slots off on a pool that had them on.
With this change, a PATCH or bulk update with a mask needs only the masked fields and keeps the rest. Masked fields are still validated ({"slots": null} is still a 422), and a PATCH without a mask still needs the full body.
The service validated the body against the full pool schema before applying the mask. Now it validates only the fields it will write and takes the other required ones from the stored pool.
closes: #73768
related: #71220 edits the same validation block. They are compatible; the second to merge needs a rebase there.
Testing Done
The reproducer below drives a real API server (SQLite, simple auth manager) run with airflow from uv sync --project airflow-core, once at main 18fe1c6 and once at this branch.
Before, main at 18fe1c6:
After, this branch:
Reproducer source: pool-mask-e2e.sh
Was generative AI tooling used to co-author this PR?
Generated-by: GitHub Copilot CLI (Claude Opus 5.5) following the guidelines