Skip to content

Commit 3d9d5ca

Browse files
wanpengfei-githuailiu1122claude
authored
[Tool] unstable-case-review: owner-based bucket for the inspection package (#76431)
Signed-off-by: huailiu1122 <liuhuaiyuan@starrocks.com> Co-authored-by: huailiu1122 <liuhuaiyuan@starrocks.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent dbcfd39 commit 3d9d5ca

1 file changed

Lines changed: 19 additions & 21 deletions

File tree

.github/workflows/unstable-case-review.yml

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: UNSTABLE CASE REVIEW
44
# Cases that now pass are auto-removed from unstable_case.json.
55
# Still-failing cases get AI analysis in an HTML report uploaded to OSS.
66
# Runs on the native ubuntu server ([self-hosted, ubuntu, ai]).
7-
# Manual-only for now (schedule removed): once validated on CelerData and
8-
# runners are also registered on StarRocks, a schedule can be re-added.
7+
# Manual-only for now (schedule removed): once validated and self-hosted
8+
# [ubuntu, ai] runners are registered, a schedule can be re-added.
99

1010
on:
1111
workflow_dispatch:
@@ -28,7 +28,7 @@ on:
2828
default: '3'
2929
type: string
3030
grant_probation:
31-
description: 'Open a PR moving now-passing blacklisted cases into PROBATION (default false; needs SYNC_PAT, i.e. CelerData)'
31+
description: 'Open a PR moving now-passing blacklisted cases into PROBATION (default false; needs SYNC_PAT to open the PR)'
3232
required: false
3333
default: 'false'
3434
type: string
@@ -189,25 +189,23 @@ jobs:
189189
rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull >/dev/null && source lib/init.sh
190190
./bin/elastic-cluster.sh --template ci-admit --linuxdistro ubuntu
191191
_oss="/var/local/env/ossutil64 --config-file /root/.ossutilconfig"
192-
# Deploy the LATEST per-PR build under Release/pr/ (NOT Release/inspection/).
193-
# The per-PR CI publishes the real product build here for BOTH repos —
194-
# starrocks-ci-release/.../StarRocks-*.tar.gz and
195-
# celerdata-ci-release/.../CelerData-*.tar.gz. The old code hardcoded
196-
# starrocks-ci-release + the inspection path; on CelerData that deployed
197-
# a StarRocks COMMUNITY binary (inspection-pipeline never populates
198-
# CelerData's inspection dir), so enterprise-only cases could never
199-
# recover. Derive the bucket from the owner, pick the newest BE tar by
200-
# upload time, and derive its FE sibling from the same path — product
201-
# name and PR-dir are taken straight from the object key, so this is
202-
# owner/product-agnostic.
192+
# Deploy the latest inspection build. The inspection-pipeline does a
193+
# periodic FULL build of the branch (BE+FE together, keyed by the
194+
# 40-char commit sha) under <owner>-ci-release/<branch>/Release/inspection/pr/ubuntu/,
195+
# so it is ALWAYS a complete pair. The bucket and the tar-name prefix are
196+
# derived from github.repository_owner, so the same workflow works in
197+
# whatever org/fork runs it (no hardcoded owner).
198+
# NOTE: OSS auto-deletes these after 3 days, so the inspection-pipeline
199+
# schedule must be enabled for ${BRANCH} or there is nothing to deploy.
203200
owner=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
204201
[[ "$owner" == "starrocks" ]] && bucket="starrocks-ci-release" || bucket="${owner}-ci-release"
205-
_base="oss://${bucket}/${BRANCH}/Release/pr/ubuntu"
206-
# ossutil ls lines start with the upload date, so `sort -r` = newest first.
207-
BE_OUTPUT_TAR=$(${_oss} ls "${_base}/" | grep -E '/be/.*-BE\.tar\.gz' | sort -r | head -1 | awk '{print $NF}')
208-
[[ -z "${BE_OUTPUT_TAR}" ]] && echo "::error::No package found under ${_base}/" && exit 1
209-
FE_OUTPUT_TAR=$(echo "${BE_OUTPUT_TAR}" | sed -e 's#/be/#/fe/#' -e 's#-BE\.tar\.gz#-FE.tar.gz#')
210-
echo "Inspection commit: ${LATEST_SHA}"
202+
product="${{ github.repository_owner }}" # tar-name prefix = the org name
203+
_base="oss://${bucket}/${BRANCH}/Release/inspection/pr/ubuntu"
204+
LATEST_SHA=$(${_oss} ls "${_base}/" | grep '\-BE\.tar\.gz' | sort -r | head -1 | awk '{print $NF}' | grep -oE '[a-f0-9]{40}')
205+
[[ -z "${LATEST_SHA}" ]] && echo "::error::No inspection package under ${_base}/ -- is the inspection-pipeline schedule enabled for ${BRANCH}? (packages auto-delete after 3 days)" && exit 1
206+
SHORT_SHA=${LATEST_SHA:0:7}
207+
BE_OUTPUT_TAR="${_base}/${LATEST_SHA}/be/${product}-${SHORT_SHA}-BE.tar.gz"
208+
FE_OUTPUT_TAR="${_base}/${LATEST_SHA}/fe/${product}-${SHORT_SHA}-FE.tar.gz"
211209
echo "BE: ${BE_OUTPUT_TAR}"
212210
echo "FE: ${FE_OUTPUT_TAR}"
213211
export BE_OUTPUT_TAR FE_OUTPUT_TAR LINUX_DISTRO=ubuntu
@@ -328,7 +326,7 @@ jobs:
328326
# unstable_case_recovered_pool.json; the promote-demote workflow drips them
329327
# into probation. This step opens a PR carrying the pool update.
330328
# Opt-in via the grant_probation input (kept for backward compat — same
331-
# cron/dispatch flag). Needs SYNC_PAT (CelerData) and ubuntu/ai runners.
329+
# cron/dispatch flag). Needs SYNC_PAT and [ubuntu, ai] runners.
332330
if: ${{ inputs.grant_probation == 'true' }}
333331
id: open_pr
334332
env:

0 commit comments

Comments
 (0)