[
https://issues.apache.org/jira/browse/THRIFT-6278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18116198#comment-18116198
]
Jens Geyer commented on THRIFT-6278:
------------------------------------
The fix is in [PR #3871|https://github.com/apache/thrift/pull/3871], which
builds on the THRIFT-6277 change in PR #3869. It differs from the second
suggestion in the description. Instead of retrying a rejected search without
the named key, the key lookup now sends {{validateQuery=false}}.
issues.apache.org then skips unknown keys in lists of any length, and the
script reports the keys that JIRA does not return. The fixVersion query keeps
the check, because without it an unknown fix version or resolution name would
change the result without an error.
The ticket pattern also skips a number followed by {{.digit}} now, so
{{thrift-0.24.0}} no longer yields THRIFT-0. Across all commits on master,
THRIFT-0 is the only key this drops.
_Drafted with AI assistance (Claude Opus 5); reviewed and posted by Jens Geyer._
> CHANGES draft generator loses a whole JIRA lookup over one nonexistent ticket
> key
> ---------------------------------------------------------------------------------
>
> Key: THRIFT-6278
> URL: https://issues.apache.org/jira/browse/THRIFT-6278
> Project: Thrift
> Issue Type: Bug
> Components: Build Process
> Reporter: Jens Geyer
> Priority: Minor
> Fix For: 0.25.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {{build/generate-changes.py}} looks up the tickets it finds in commit
> messages with {{key in (...)}} searches of up to 50 keys. If a list of 25
> keys or fewer contains a key that does not exist, JIRA rejects the whole
> search with HTTP 400 ("An issue with key 'THRIFT-0' does not exist for field
> 'key'."). Longer lists are not checked. The script then prints a warning and
> loses every ticket in that search.
> Such keys do occur. The ticket pattern ignores case, so the path
> {{thrift-0.24.0/lib/cpp/...}} in the body of commit da6ed655d yields THRIFT-0.
> * On master today, the {{--jira-version 0.25.0}} run loses its extra lookup
> of tickets found in git this way. With THRIFT-6277 that lookup can only add
> tickets the fixVersion query already returns, so nothing is lost there.
> * In git-only mode, THRIFT-0 happens to fall into a full batch of 50 keys. In
> a batch of 25 keys or fewer, for example the last batch or the first batch of
> a small patch release, a nonexistent key drops every ticket of that batch
> from the draft. Their commits then show up as plain commit links.
> Possible fixes:
> * ignore a match that is followed by a dot and a digit, as in a version string
> * when JIRA rejects a search, retry it without the key the error message names
> _Drafted with AI assistance (Claude Opus 5); reviewed and posted by Jens
> Geyer._
--
This message was sent by Atlassian Jira
(v8.20.10#820010)