Repository navigation
[v3-3-test] API: Fix prefix pattern search returning rows without the prefix - #73558
Merged
Merged
Conversation
…che#73520) The *_prefix_pattern filters turn a prefix into an index-friendly range scan. Whenever bumping the last character would leave the alphanumeric range ('9', 'z', 'Z'), the upper bound is recomputed from a shorter prefix, so the scanned range is far wider than the prefix the caller asked for: searching "dag_9" also returns "dag_abc", searching "a9" returns everything starting with "a", and searching "z" gets no upper bound at all. This affects every *_prefix_pattern query parameter, so a UI search box and a REST client both get results that do not match what was typed. The documented trade-off of stripping trailing non-alphanumeric characters is deliberate and stays; only the undocumented widening is addressed here, and the bounds themselves are left alone so the B-tree index still drives the scan. Co-authored-by: Eason09053360 <[email protected]> (cherry picked from commit 6036de1)
pierrejeambrun
requested review from
bugraoz93,
choo121600,
ephraimbuddy,
henry3260,
jason810496,
rawwar and
shubhamraj-git
as code owners
September 22, 2026 14:34
Contributor
|
Hi maintainer, this PR was merged without a milestone set.
|
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.
Backport of #73520 to
v3-3-test.Cherry-picked from 6036de1.
One conflict on
airflow-core/src/airflow/api_fastapi/common/parameters/search.pyimports: main added_RegexParambetween v3-3-test's cutoff and now, which pulled infrom fastapi import HTTPException, Query, status. v3-3-test has no_RegexParamand does not useHTTPException/statusanywhere in this file. Resolved by keeping v3-3-test'sfrom fastapi import Queryand adding onlyfuncto the sqlalchemy import — that's the only new import the fix itself needs. The test file auto-merged cleanly.Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Opus 4.7) following the guidelines