metadata: annotations: prow.k8s.io/context: pull-check-deps prow.k8s.io/job: pull-check-deps creationTimestamp: "2025-10-29T23:35:22Z" generation: 7 labels: created-by-prow: "true" event-GUID: ef44ea10-b51f-11f0-87ea-9e403116c111 prow.k8s.io/build-id: "1983679080788135936" prow.k8s.io/context: pull-check-deps prow.k8s.io/id: 4c2312e3-30d5-49c4-83a1-242397b9414c prow.k8s.io/is-optional: "true" prow.k8s.io/job: pull-check-deps prow.k8s.io/refs.base_ref: release-8.5 prow.k8s.io/refs.org: pingcap prow.k8s.io/refs.pull: "64185" prow.k8s.io/refs.repo: tidb prow.k8s.io/type: presubmit name: 4c2312e3-30d5-49c4-83a1-242397b9414c namespace: apps resourceVersion: "1761781127510943017" uid: f51c7306-bc1a-4519-8b4d-1adfa28163b6 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/40946f950be6d686f118cf9e3b167e0a21e57c25 base_ref: release-8.5 base_sha: 40946f950be6d686f118cf9e3b167e0a21e57c25 org: pingcap pulls: - author: ti-chi-bot author_link: https://github.com/ti-chi-bot commit_link: https://github.com/pingcap/tidb/pull/64185/commits/594715880c81caca822ce37a2379581d2b4daf58 head_ref: cherry-pick-64001-to-release-8.5 link: https://github.com/pingcap/tidb/pull/64185 number: 64185 sha: 594715880c81caca822ce37a2379581d2b4daf58 title: 'session: fix rollback on killed txn may panic (#64001)' repo: tidb repo_link: https://github.com/pingcap/tidb skip_submodules: true rerun_command: /test pull-check-deps type: presubmit status: build_id: "1983679080788135936" completionTime: "2025-10-29T23:38:46Z" description: Job succeeded. pendingTime: "2025-10-29T23:35:22Z" pod_name: 4c2312e3-30d5-49c4-83a1-242397b9414c prev_report_states: gcsk8sreporter: success gcsreporter: success startTime: "2025-10-29T23:35:22Z" state: success url: https://prow.tidb.net/view/gs/prow-tidb-logs/pr-logs/pull/pingcap_tidb/64185/pull-check-deps/1983679080788135936