metadata: annotations: prow.k8s.io/context: pull-check-deps prow.k8s.io/job: pull-check-deps creationTimestamp: "2025-09-20T01:27:18Z" generation: 7 labels: created-by-prow: "true" event-GUID: f121d0b0-95c0-11f0-8c5e-001bb7032274 prow.k8s.io/build-id: "1969211733507575808" prow.k8s.io/context: pull-check-deps prow.k8s.io/id: 1904d780-5822-4bc2-ad7b-30db634d8fb9 prow.k8s.io/is-optional: "true" prow.k8s.io/job: pull-check-deps prow.k8s.io/refs.base_ref: release-7.1 prow.k8s.io/refs.org: pingcap prow.k8s.io/refs.pull: "63628" prow.k8s.io/refs.repo: tidb prow.k8s.io/type: presubmit name: 1904d780-5822-4bc2-ad7b-30db634d8fb9 namespace: apps resourceVersion: "1758331840651199019" uid: 5a94f8bf-bae5-494d-b923-bb4abc022b13 spec: agent: kubernetes cluster: default context: pull-check-deps decoration_config: gcs_configuration: bucket: gs://prow-tidb-logs path_strategy: explicit gcs_credentials_secret: gcs-credentials utility_images: clonerefs: gcr.io/k8s-prow/clonerefs:v20230601-43eb1068e4 entrypoint: gcr.io/k8s-prow/entrypoint:v20230601-43eb1068e4 initupload: gcr.io/k8s-prow/initupload:v20230601-43eb1068e4 sidecar: gcr.io/k8s-prow/sidecar:v20230601-43eb1068e4 job: pull-check-deps namespace: prow-test-pods pod_spec: containers: - args: - "set -eo pipefail\n# skip it for batch jobs\nif [[ \"${JOB_TYPE:-}\" == \"batch\" ]]; then\n echo \"JOB_TYPE is batch, skip it.\"\n exit 0\nfi\n# skip it when the base branch is not in [master, release-X.Y]\nif [[ \"${PULL_BASE_REF}\" != \"master\" && ! \"${PULL_BASE_REF}\" =~ ^release-[0-9]+\\.[0-9]+$ ]]; then\n \ echo \"base branch is not in [master, release-X.Y], skip it.\"\n exit 0\nfi\n\necho \"\U0001F4AC base branch of the PR: ${PULL_BASE_REF}\"\n\n# install tools: jq\napt-get update && apt-get install -y jq\n\n## Check for go module dependencies\ndeps=(\n \ \"github.com/pingcap/kvproto\"\n \"github.com/pingcap/tipb\"\n \"github.com/tikv/client-go\"\n \ \"github.com/tikv/pd/client\"\n # add more on demand...\n)\n\n# Define prefix replace KV pairs: key is dep prefix, value is the branch prefix to use.\ndeclare -A dep_branch_prefix_map=(\n # For github.com/tikv/client-go, map release-X.Y to tidb-X.Y.\n [\"github.com/tikv/client-go\"]=\"tidb\"\n)\n\n# Function to get expected branch for a dependency\nget_expect_branch() {\n \ local dep=\"$1\"\n local base_branch=\"$2\"\n for prefix in \"${!dep_branch_prefix_map[@]}\"; do\n if [[ \"$dep\" == \"$prefix\"* ]]; then\n # If base_branch is release-X.Y, map to tidb-X.Y\n if [[ \"$base_branch\" =~ ^release-([0-9]+\\.[0-9]+)$ ]]; then\n echo \"${dep_branch_prefix_map[$prefix]}-${BASH_REMATCH[1]}\"\n \ return\n fi\n fi\n done\n # Default: use base branch as is\n echo \"$base_branch\"\n}\n\nfor dep in \"${deps[@]}\"; do\n echo \"\U0001F50D checking ${dep} branch...\"\n expect_include_branch=$(get_expect_branch \"$dep\" \"$PULL_BASE_REF\")\n echo \"ℹ️ The expected branch of go module ${dep} is '${expect_include_branch}'.\"\n\n # get the repo and commit\n dep_info=$(go list -m -json \"$dep\" 2>/dev/null) || {\n echo \"ℹ️ Dependency ${dep} not found in this project, skipping.\";\n continue;\n }\n commit=$(echo \"$dep_info\" | jq -r 'if .Version | test(\"-[0-9a-f]{12}$\") then .Version | split(\"-\") | .[2] else \"null\" end')\n if [[ \"$commit\" == \"null\" ]]; then\n echo \"ℹ️ Dependency ${dep} is not using a pseudo-version, skipping check.\"\n continue\n fi\n echo \"ℹ️ The commit of go module ${dep} is '${commit}'.\"\n\n # Extract repo URL from module path, handling possible subfolders\n repo_url=$(echo \"$dep_info\" | jq -r '.Path' | awk -F/ '{print \"https://\"$1\"/\"$2\"/\"$3\".git\"}')\n to_clone_folder=$(basename \"$repo_url\" .git)\n\n git clone \"$repo_url\" ../${to_clone_folder} && pushd ../${to_clone_folder}\n \ git checkout \"${expect_include_branch}\" || (\n echo \"❌ branch ${expect_include_branch} in ${repo_url} not found\"\n exit 1\n )\n\n \ # check whether the commit is in the expected branch\n if ! git merge-base --is-ancestor \"$commit\" \"${expect_include_branch}\"; then\n echo \"❌ commit ${commit} is not in branch '${expect_include_branch}' of ${repo_url}\"\n \ exit 1\n fi\n popd\n echo \"\U0001F389 ${dep} branch is correct\"\n\n \ # clean up for next\n rm -rf ../${to_clone_folder}\ndone\n\necho \"\U0001F389 All dependencies are correct\"\n" command: - bash - -c image: golang:1.25 name: build resources: limits: cpu: 100m memory: 256Mi requests: cpu: 50m memory: 128Mi prowjob_defaults: tenant_id: GlobalDefaultID refs: base_link: https://github.com/pingcap/tidb/commit/31bc20973ac079721c7c2edc593784e3456684bb base_ref: release-7.1 base_sha: 31bc20973ac079721c7c2edc593784e3456684bb org: pingcap pulls: - author: ti-chi-bot author_link: https://github.com/ti-chi-bot commit_link: https://github.com/pingcap/tidb/pull/63628/commits/fd82c1a8706ffea7def04083861dd71eaaa0fbf1 head_ref: cherry-pick-63420-to-release-7.1 link: https://github.com/pingcap/tidb/pull/63628 number: 63628 sha: fd82c1a8706ffea7def04083861dd71eaaa0fbf1 title: 'br: fix stats meta count is zero if no checksum 8.5 (#63420)' repo: tidb repo_link: https://github.com/pingcap/tidb skip_submodules: true rerun_command: /test pull-check-deps type: presubmit status: build_id: "1969211733507575808" completionTime: "2025-09-20T01:30:40Z" description: Job succeeded. pendingTime: "2025-09-20T01:27:18Z" pod_name: 1904d780-5822-4bc2-ad7b-30db634d8fb9 prev_report_states: gcsk8sreporter: success gcsreporter: success startTime: "2025-09-20T01:27:18Z" state: success url: https://prow.tidb.net/view/gs/prow-tidb-logs/pr-logs/pull/pingcap_tidb/63628/pull-check-deps/1969211733507575808