<freeStyleBuild _class='hudson.model.FreeStyleBuild'><action _class='hudson.model.CauseAction'><cause _class='com.cloudbees.jenkins.GitHubPushCause'><shortDescription>Started by GitHub push by ti-chi-bot[bot]</shortDescription></cause></action><action></action><action _class='jenkins.metrics.impl.TimeInQueueAction'><blockedDurationMillis>0</blockedDurationMillis><blockedTimeMillis>0</blockedTimeMillis><buildableDurationMillis>22605</buildableDurationMillis><buildableTimeMillis>22605</buildableTimeMillis><buildingDurationMillis>102964</buildingDurationMillis><executingTimeMillis>102964</executingTimeMillis><executorUtilization>1.0</executorUtilization><queuingDurationMillis>31960</queuingDurationMillis><queuingTimeMillis>31960</queuingTimeMillis><subTaskCount>0</subTaskCount><totalDurationMillis>134924</totalDurationMillis><waitingDurationMillis>9353</waitingDurationMillis><waitingTimeMillis>9353</waitingTimeMillis></action><action _class='hudson.plugins.git.util.BuildData'><buildsByBranchName><originmain _class='hudson.plugins.git.util.Build'><buildNumber>1762</buildNumber><marked><SHA1>261bc4f777143c96b2b4140a164530f8f83cd0ac</SHA1><branch><SHA1>261bc4f777143c96b2b4140a164530f8f83cd0ac</SHA1><name>origin/main</name></branch></marked><revision><SHA1>261bc4f777143c96b2b4140a164530f8f83cd0ac</SHA1><branch><SHA1>261bc4f777143c96b2b4140a164530f8f83cd0ac</SHA1><name>origin/main</name></branch></revision></originmain></buildsByBranchName><lastBuiltRevision><SHA1>261bc4f777143c96b2b4140a164530f8f83cd0ac</SHA1><branch><SHA1>261bc4f777143c96b2b4140a164530f8f83cd0ac</SHA1><name>origin/main</name></branch></lastBuiltRevision><remoteUrl>https://github.com/PingCAP-QE/ci.git</remoteUrl><scmName></scmName></action><action></action><action></action><action></action><action></action><action></action><action></action><action _class='org.jenkinsci.plugins.displayurlapi.actions.RunDisplayAction'><artifactsUrl>https://do.pingcap.net/jenkins/blue/organizations/jenkins/seed/detail/seed/1762/artifacts</artifactsUrl><changesUrl>https://do.pingcap.net/jenkins/blue/organizations/jenkins/seed/detail/seed/1762/changes</changesUrl><displayUrl>https://do.pingcap.net/jenkins/blue/organizations/jenkins/seed/detail/seed/1762/</displayUrl><testsUrl>https://do.pingcap.net/jenkins/blue/organizations/jenkins/seed/detail/seed/1762/tests</testsUrl></action><building>false</building><displayName>#1762</displayName><duration>102964</duration><estimatedDuration>109407</estimatedDuration><fullDisplayName>seed #1762</fullDisplayName><id>1762</id><inProgress>false</inProgress><keepLog>false</keepLog><number>1762</number><queueId>3693690</queueId><result>SUCCESS</result><timestamp>1781189855111</timestamp><url>https://do.pingcap.net/jenkins/job/seed/1762/</url><builtOn>default-jl50r</builtOn><changeSet _class='hudson.plugins.git.GitChangeSetList'><item _class='hudson.plugins.git.GitChangeSet'><affectedPath>tekton/v1/tasks/delivery/pingcap-notify-to-deliver-images-to-cloud-tidbx.yaml</affectedPath><commitId>261bc4f777143c96b2b4140a164530f8f83cd0ac</commitId><timestamp>1781189817000</timestamp><author><absoluteUrl>https://do.pingcap.net/jenkins/user/noreply</absoluteUrl><fullName>noreply</fullName></author><authorEmail>noreply@github.com</authorEmail><comment>refactor(tekton/v1/tasks): refactor tidbx delivery task to use rotating queue issues (#4677)

## Problem

The `pingcap-notify-to-deliver-images-to-cloud-tidbx` task posts `/fid`
commands as comments on a **fixed GitHub issue**. GitHub limits issues
to 2500 comments, and once reached, the API rejects new comments.
Additionally, the old script used `set -e` without `pipefail`, so when
`gh issue comment | tee ...` failed, the pipeline's exit code came from
`tee` (always 0), silently swallowing the error.

## Solution

Replace the fixed-issue approach with an **auto-rotating queue issue**
mechanism:

- Each stage (`dev`/`prod`) gets a queue issue tracked by a
**hierarchical label** `delivery-queue-tidbx/&lt;stage&gt;`.
- On each run, the task looks up the current open queue issue for that
label.
- If the issue has **≥ 2000 comments**, it closes the old issue and
creates a new one (rotation).
- The `/fid` command is posted as a comment on the current (new or
existing) queue issue.
- Added `gh label create` as a safety net so the label is auto-created
on first use if it doesn't exist in the repo.

### Changes

| Before | After |
|---|---|
| Fixed issue URL from workspace secret (`&lt;stage&gt;_github_issue_url`) |
Auto-discovered via label `delivery-queue-tidbx/&lt;stage&gt;` |
| No rotation — comments accumulate until 2500 API limit | Auto-rotation
at 2000 comments |
| `set -e` (pipe exits 0 when `tee` succeeds) | `set -eo pipefail` (fail
immediately on pipe error) |
| Workspace expects `&lt;stage&gt;_github_issue_url` | Workspace expects
`&lt;stage&gt;_github_repo` (e.g. `pingcap/tidb`) |

## Migration

The cluster secret `image-delivery-notify-config-tidbx` needs updating:

```
- dev_github_issue_url=https://github.com/.../issues/N
+ dev_github_repo=pingcap/tidb
- prod_github_issue_url=https://github.com/.../issues/M
+ prod_github_repo=pingcap/tidb
```
</comment><date>2026-06-11 14:56:57 +0000</date><id>261bc4f777143c96b2b4140a164530f8f83cd0ac</id><msg>refactor(tekton/v1/tasks): refactor tidbx delivery task to use rotating</msg><path><editType>edit</editType><file>tekton/v1/tasks/delivery/pingcap-notify-to-deliver-images-to-cloud-tidbx.yaml</file></path></item><kind>git</kind></changeSet><culprit><absoluteUrl>https://do.pingcap.net/jenkins/user/noreply</absoluteUrl><fullName>noreply</fullName><id>noreply</id></culprit></freeStyleBuild>