Skip to content

fix(pipelines): align check2 pod resources to 24Gi/3C across release branches - #5199

Merged
ti-chi-bot[bot] merged 1 commit into
mainfrom
fix/align-check2-pod-resources
Sep 10, 2026
Merged

ti-chi-bot[bot] merged 1 commit into
mainfrom
fix/align-check2-pod-resources

Conversation

@wuhuizuo

Copy link
Copy Markdown
Contributor

Why

The check2 (ghpr_check2 / pull_check2) pod resources diverge across release branches, and release-7.5 is the tightest:

branch requests limits
release-6.5 8Gi / 2C 32Gi / 8C
release-7.1 12Gi / 3C 12Gi / 3C
release-7.5 12Gi / 3C 12Gi / 3C
release-8.1 12Gi / 3C 12Gi / 3C
release-8.5 24Gi / 3C 24Gi / 3C
latest 24Gi / 3C 24Gi / 3C

#4982 reduced release-7.5 from 24Gi/6C req + 32Gi/8C lim to 12Gi/3C (the only branch whose memory was lowered). Its real-tikv import tests (bazel_importintotest4) then started failing with PD TSO timeouts and bazel test timeouts; 12Gi is below the ~12.3Gi peak that #4982 measured for the heavy bazel targets.

What

Align the golang container of release-6.5, release-7.1, release-7.5 and release-8.1 with latest / release-8.5:

resources:
  requests:
    memory: 24Gi
    cpu: "3"
  limits:
    memory: 24Gi
    cpu: "3"

release-8.5 already uses 24Gi/3C, so it is unchanged.

Notes

  • Only spec.containers[golang].resources changes; no image / volume / affinity changes.
  • Verified with .ci/verify-k8s-pod-yaml.sh on the changed files.

Related to the release-7.5 jenkins migration verification in #5136.

…branches

Align the ghpr_check2/pull_check2 golang container resources for
release-6.5, release-7.1, release-7.5 and release-8.1 with latest and
release-8.5 (requests == limits == 24Gi/3C).

release-7.5 was reduced to 12Gi/3C by #4982 and is now the tightest
among the same-named jobs. Its real-tikv import tests hit PD TSO
timeouts and bazel test timeouts; 24Gi is the value already validated
for the heavy bazel targets.

release-8.5 already uses 24Gi/3C, so it is unchanged.

@ti-chi-bot ti-chi-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have already done a preliminary review for you, and I hope to help you do a better job.

Summary

This PR standardizes the golang container resource requests and limits for the check2 pods across multiple release branches (release-6.5, release-7.1, release-7.5, release-8.1) to 24Gi memory and 3 CPU cores, aligning them with the latest and release-8.5 branches. The approach is a straightforward YAML configuration update with no changes to image or other pod specs. The changes are clear, well-scoped, and justified by observed test failures due to insufficient resources in some branches. Overall, the PR is well-done and focused.


Code Improvements

  • Maintainability: Centralize resource definitions

    • Where: All modified files (pipelines/pingcap/tidb/release-*.5/pod-ghpr_check2.yaml)

    • Issue: The resource specs are duplicated across multiple release branches' pod YAML files.

    • Why: This duplication increases maintenance burden and risk of divergence again in the future.

    • Suggestion: Consider templating or using a shared base manifest or a kustomize/helm overlay with a common resource block for check2 pods to avoid manual sync across branches.

      Example approach (conceptual):

      # base/check2-resources.yaml
      resources:
        requests:
          memory: 24Gi
          cpu: "3"
        limits:
          memory: 24Gi
          cpu: "3"

      Then overlay this in each branch's pod definition to reduce duplication.

  • Explicit CPU as string vs integer

    • Where: All changed files, CPU is "3" (string)
    • Issue: Kubernetes accepts CPU as a string or number; consistent type helps avoid confusion.
    • Why: Current usage is consistent, but if other manifests use integer, consider aligning.
    • Suggestion: Confirm consistency in CPU specification format across all pod specs. If all others use string, keep as is.

Best Practices

  • Add comments explaining the resource values

    • Where: At the resource block in each YAML (pod-ghpr_check2.yaml)

    • Issue: While the PR description explains the rationale, the YAML files themselves lack comments.

    • Why: Adding comments directly in the YAML improves long-term clarity for maintainers.

    • Suggestion: Add a brief comment above the resources block indicating why these resource values were chosen, e.g.:

      # Set to 24Gi memory and 3 CPU cores to prevent bazel test timeouts and PD TSO issues observed at lower memory.
      resources:
        requests:
          memory: 24Gi
          cpu: "3"
        limits:
          memory: 24Gi
          cpu: "3"
  • Consider adding or updating test coverage

    • Where: CI pipeline definitions or test suites (not shown here)
    • Issue: No indication if resource config changes are validated by automated tests.
    • Why: Validating resource configs prevent regressions in resource allocations.
    • Suggestion: If not present, create or update tests that validate pod resource requests/limits for critical pods in CI pipelines.

Critical Issues

None identified. The changes are limited to resource requests/limits and do not affect pod logic or security.


Summary: This PR effectively resolves resource inconsistencies impacting test stability. To further improve maintainability, consider centralizing resource configs and adding inline comments. Adding or verifying automated tests for these changes would also help prevent future regressions.

@ti-chi-bot ti-chi-bot Bot added the size/S label Sep 10, 2026
@wuhuizuo

Copy link
Copy Markdown
Contributor Author

/approve

@ti-chi-bot

ti-chi-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: wuhuizuo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot Bot added the approved label Sep 10, 2026
@ti-chi-bot
ti-chi-bot Bot merged commit 1f7568d into main Sep 10, 2026
7 checks passed
@ti-chi-bot
ti-chi-bot Bot deleted the fix/align-check2-pod-resources branch September 10, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

1 participant