Skip to content

THRIFT-6278: Don't lose a CHANGES draft JIRA lookup to one unknown key - #3871

Merged
Jens-G merged 2 commits into
apache:masterfrom
Jens-G:THRIFT-6278
Sep 17, 2026
Merged

Jens-G merged 2 commits into
apache:masterfrom
Jens-G:THRIFT-6278

Conversation

@Jens-G

@Jens-G Jens-G commented Sep 16, 2026

Copy link
Copy Markdown
Member

Fixes THRIFT-6278.

Stacked on #3869 (THRIFT-6277). Both PRs change the JIRA lookup in build/generate-changes.py, so this branch builds on that one. Until #3869 is merged, this PR also shows its commit. Only the top commit (THRIFT-6278) is new here, and I'll rebase once #3869 is in.

Problem

generate-changes.py looks up the tickets it finds in commit messages with key in (...) searches of up to 50 keys. issues.apache.org checks that every key exists only in lists of 25 keys or fewer. If one of those keys does not exist, it rejects the whole search with HTTP 400, and every ticket in that search is lost.

Master has such a key today. The ticket pattern ignores case, so the path thrift-0.24.0/lib/cpp/... in the body of da6ed65 is read as THRIFT-0. Because of it, the extra lookup of the --jira-version run (22 keys) fails every time.

Changes

  • The key lookup sends validateQuery=false, and the script itself reports keys that JIRA does not return (Warning: referenced tickets not found in JIRA: ...). The ticket suggested retrying without the key named in the error message. Turning the check off needs no extra request and does not depend on the wording of JIRA's error.
  • The fixVersion query keeps the check on purpose. Without it, an unknown fix version returns no tickets, and an unknown name in resolution not in (...) excludes nothing, both without an error.
  • The ticket pattern skips a number followed by .digit, as in a version string. Across all 7,977 commits on master this drops only THRIFT-0 (2 commits). The 794 other matches followed by a dot are kept.

How issues.apache.org behaves (probed)

query result
key in (...) with 25 keys or fewer, one of them unknown HTTP 400, every ticket lost
the same with 26 keys or more 200, unknown key skipped
the same with validateQuery=false 200, unknown key skipped
validateQuery=strict, warn or none same as false, no warnings returned: only true, the default, validates
a JQL syntax error, any validateQuery HTTP 400

Testing

🤖 Generated with Claude Code

Jens-G and others added 2 commits September 16, 2026 23:39
Client: build

The CHANGES draft listed every THRIFT ticket a commit message mentions,
without looking at the ticket's Fix Version/s, resolution or status. The
0.25.0 draft therefore carried THRIFT-1337, fixed in 2011, because the
THRIFT-6183 commit cites it as history. It also carried other old tickets
cited the same way, a Won't Do ticket and tickets that are still open.
With --jira-version, the extra lookup of tickets found in git had the
same gap.

Fetch Fix Version/s, status and resolution with each ticket. Keep a ticket
found in git only if JIRA files it under the release version, using the
same test as the fixVersion query: the version is among its Fix
Version/s, it has a resolution, and it is not Open. The version is
--jira-version if given, otherwise --version or configure.ac. A commit
whose tickets all fail the test is listed as a commit link under its
Client: section instead, and the skipped tickets are named on stderr.

The fixVersion query and that test now also leave out tickets resolved
without a change, such as Won't Do, Won't Fix, Not A Problem or Cannot
Reproduce, even when they carry the fix version. Duplicate still counts.

Commit links now also drop a "Patch: Name" or "Autor: Name" trailer from
the subject. Such commits used to be hidden behind their ticket.

Both JIRA queries now build their entries with one shared helper.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Client: build

generate-changes.py looks up the tickets it finds in commit messages with
JIRA "key in (...)" searches of up to 50 keys. For a list of 25 keys or
fewer, JIRA checks that every key exists and rejects the whole search if
one does not, so every ticket in that search was lost. Longer lists are
not checked.

Such keys do occur. The ticket pattern ignores case, so the path
"thrift-0.24.0/lib/cpp/..." in the body of da6ed65 was read as
THRIFT-0. On current master this made the extra lookup of the
--jira-version run fail every time.

Turn the check off for the key lookup and report the keys JIRA does not
return instead. The fixVersion query keeps the check: without it, a
mistyped version or resolution name would quietly change the result
instead of failing. The ticket pattern now skips a number followed by
".digit", as in a version string. Across the whole history this drops
only THRIFT-0.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mergeable mergeable Bot added the build and general CI cmake, automake and build system changes label Sep 16, 2026
@Jens-G Jens-G self-assigned this Sep 16, 2026
@Jens-G
Jens-G merged commit e106880 into apache:master Sep 17, 2026
103 checks passed
@Jens-G
Jens-G deleted the THRIFT-6278 branch September 17, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build and general CI cmake, automake and build system changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant