Skip to content

ci(prow): migrate pingcap/tidb release-7.1 jobs to target jenkins - #5135

Open
wuhuizuo wants to merge 2 commits into
mainfrom
phase4/pingcap-tidb-release-7.1
Open

ci(prow): migrate pingcap/tidb release-7.1 jobs to target jenkins#5135
wuhuizuo wants to merge 2 commits into
mainfrom
phase4/pingcap-tidb-release-7.1

Conversation

@wuhuizuo

@wuhuizuo wuhuizuo commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Part of #4959.

Summary

Flip labels.master "1" -> "0" for the jenkins-agent jobs in prow-jobs/pingcap/tidb/release-7.1-presubmits.yaml so they are scheduled on the to Jenkins.

Part of #4947 / #4942

@ti-chi-bot

ti-chi-bot Bot commented Sep 4, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign wuhuizuo for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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 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 updates the presubmit jobs configuration for the pingcap/tidb repository, specifically for the release-7.1 branch, by changing the labels.master value from "1" to "0" for all Jenkins agent jobs. This effectively flips the scheduling target to a new Jenkins instance. The change is straightforward, consistent, and limited to a single YAML file, reflecting a migration step in CI infrastructure. The patch is clean and focused, with no apparent syntax errors.


Code Improvements

  • Avoid repeated manual edits for similar jobs (prow-jobs/pingcap/tidb/release-7.1-presubmits.yaml lines ~10–220)
    The PR changes the same field (labels.master) from "1" to "0" in many jobs. This repetitive manual change is error-prone and harder to maintain. Instead, consider:

    • Using YAML anchors and aliases to define the common labels block once and reuse it.
    • Or, if supported by your tooling, introducing a variable or parameter for labels.master to make future flips easier.
    • Or scripting the change to avoid manual copy-paste errors.

    Example snippet using YAML anchor:

    default_labels: &default_labels
      master: "0"
    
    presubmits:
      - name: pingcap/tidb/release-7.1/ghpr_build
        agent: jenkins
        labels: *default_labels
        ...
  • Add explanatory comments about the label flip
    The single-line comment # need add this. on decorate: false is unclear and should be clarified or removed. Also, add a top-level comment in this YAML file or near the labels.master keys explaining what "0" vs "1" means (e.g., which Jenkins instance "0" refers to) for maintainability.


Best Practices

  • Testing coverage
    Since this PR changes job scheduling, validate that the jobs are correctly triggered on the new Jenkins setup. Consider adding or updating integration tests or manual verification steps documented in the PR or repo docs.

  • Documentation update
    This migration affects CI infrastructure. Ensure that any relevant documentation (internal or external) referencing the Jenkins agent labels or job scheduling reflects this change. If this PR is part of a larger migration (#4959), link to or update those docs accordingly.

  • Style and formatting consistency
    The comment # need add this. appears multiple times. Standardize comment style and grammar, e.g., # Required to enable decoration. or remove if not needed.


No critical issues were found as the change is a simple label value update affecting scheduling. The suggestions above help improve maintainability and clarity for future changes.

@ti-chi-bot

ti-chi-bot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Jenkins Migration Verification

Migrating jenkins-agent Prow jobs to the to Jenkins (labels.master: 1 -> 0).

  • pingcap/tidb/release-7.1/ghpr_check
    • status: infra-fail
  • pingcap/tidb/release-7.1/ghpr_check2
    • status: failed
  • pingcap/tidb/release-7.1/ghpr_unit_test
    • status: infra-fail
  • pingcap/tidb/release-7.1/pull_br_integration_test
    • status: skipped
  • pingcap/tidb/release-7.1/pull_e2e_test
    • status: skipped
  • pingcap/tidb/release-7.1/pull_common_test
    • status: skipped
  • pingcap/tidb/release-7.1/pull_integration_common_test
    • status: skipped
  • pingcap/tidb/release-7.1/pull_sqllogic_test
    • status: skipped
  • pingcap/tidb/release-7.1/pull_tiflash_test
    • status: skipped
  • pingcap/tidb/release-7.1/pull_integration_tidb_tools_test
    • status: skipped
  • pingcap/tidb/release-7.1/pull_integration_binlog_test
    • status: skipped

Summary: success=0 submitted=0 failed=1 infra-fail=2 skipped=8 dry-run=0 total=11

@ti-chi-bot ti-chi-bot Bot added the size/M label Sep 4, 2026
wuhuizuo added a commit that referenced this pull request Sep 4, 2026
…nkins

Split from #5135: jobs verified SUCCESS on the to Jenkins in
pull-verify-jenkins-migration runid 2095811252558237696. Flip their labels.master.

Part of #4959
wuhuizuo added a commit that referenced this pull request Sep 4, 2026
…nkins (#5162)

Split from #5135 — only the jobs that verified **SUCCESS** on the to
Jenkins (verify runid 2095811252558237696):
- `pull_integration_copr_test`
Flip labels.master "1" -> "0" for the jenkins-agent jobs in prow-jobs/pingcap/tidb/release-7.1-presubmits.yaml so
they are scheduled on the to Jenkins.

Part of #4959
@wuhuizuo
wuhuizuo force-pushed the phase4/pingcap-tidb-release-7.1 branch from f74ae77 to 55b690f Compare September 7, 2026 03:17

@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 updates the scheduling labels for all Jenkins agent jobs in the release-7.1-presubmits.yaml file for pingcap/tidb from master: "1" to master: "0". This change reroutes the jobs to a new Jenkins target as part of a CI migration effort. The approach is a straightforward label value flip repeated consistently across many job definitions. The change is simple and low risk given the uniform pattern, but it involves a large number of repetitive edits.


Code Improvements

  • Avoid repetitive manual edits:
    The PR changes the same label key-value pair (master: "1"master: "0") in many places. This is error-prone and hard to maintain. Consider introducing a variable or a template mechanism if your CI configuration system supports it, or use a script to bulk update these labels. For example, if you regenerate this YAML from a template or a config management tool, you can update the label once and regenerate all jobs. This reduces the chance of missing jobs or inconsistent labels.

  • Verify label semantics and correctness:
    Double-check that the label master with values "0" or "1" correctly controls the scheduling target as intended. It might be clearer to rename the label to something more descriptive, e.g., jenkins-target: "old" or "new", if feasible. This reduces ambiguity about what master: "0" means.


Best Practices

  • Add a comment explaining the label change:
    In the YAML file near the labels section, add a comment like:

    labels:
      # Changed from "1" to "0" to migrate jobs to the new Jenkins target as per #4959
      master: "0"

    This helps future maintainers understand why the label changed without needing to reference the PR or issue.

  • Test coverage and validation:
    Since this is a CI configuration change, ensure that these jobs are tested or validated on the target Jenkins environment before merging. If there is an automated validation step for prow job YAMLs, run it to catch syntax or schema errors.

  • Consider documenting migration in CI docs:
    Since this is part of a broader migration (#4959), consider updating any relevant internal documentation or README files about job scheduling or Jenkins targets to reflect this change.


No critical issues detected given the nature of this change. It is a low-risk, mechanical update. The main recommendation is to improve maintainability and clarity around the label usage.

ti-chi-bot Bot pushed a commit that referenced this pull request Sep 7, 2026
## Summary

Migrate the verified `pingcap/tidb/release-7.1/ghpr_build` job to the
target Jenkins by setting `labels.master` to `"0"`.

This is split from #5135 after the migration verification
run reported this job successful.

## Validation

- `.ci/update-prow-job-kustomization.sh`
- YAML parse with `yq`
- `git diff --check`
ti-chi-bot Bot pushed a commit that referenced this pull request Sep 8, 2026
Migrate only Jenkins jobs that passed the release migration verification
round.

Included jobs:
- pingcap/tidb/release-6.5/ghpr_build (verified by #5134)
- pingcap/tidb/release-8.5/pull_build (verified by #5138)
- pingcap/tidb/release-8.5/pull_integration_nodejs_test (verified by
#5138)
- pingcap/tidb/release-8.5/pull_integration_python_orm_test (verified by
#5138)

The successful pingcap/tidb/release-7.1/ghpr_build from #5135 is already
present on main via #5174, so it is not duplicated here.

Verification: `.ci/verify-prow-jobs-run.sh` passed with dynamic creation
disabled.
@wuhuizuo

wuhuizuo commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@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 updates the prow job configurations for the pingcap/tidb release-7.1 branch by changing the labels.master value from "1" to "0" for jenkins-agent jobs. This change appears to reroute job scheduling from a current Jenkins infrastructure to a new target Jenkins, as part of the ongoing migration effort (#4959, #4947, #4942). The changes are straightforward and consistent across multiple job definitions, and the patch is clean without syntax errors.


Code Improvements

  • DRY / Bulk Update Opportunity
    The same label change (master: "1"master: "0") is repeated verbatim for many jobs. Since this is a large-scale migration across many jobs in the same file, consider if the prow job configuration supports templating or includes to avoid repetitive manual edits. This would reduce human error and improve maintainability for future migrations.

    File: prow-jobs/pingcap/tidb/release-7.1-presubmits.yaml
    Suggestion: Investigate using YAML anchors or external templating tools (e.g., kustomize, ytt, or Helm) to factor out common properties like labels, so changes can be made in one place.

  • Validation of Label Semantics
    Ensure that changing master label from "1" to "0" aligns with the expectations of the Jenkins scheduling mechanism. If these labels are boolean flags, consider using true/false or descriptive labels rather than numeric strings to improve readability and reduce confusion.

    Suggestion: Confirm with team or tooling docs whether "0" is the correct and intended value, or if a boolean false or a different label would be more idiomatic.


Best Practices

  • Add Comments Clarifying the Label Change Purpose
    The PR description mentions the migration but the YAML file itself lacks comments explaining why the master label is flipped from "1" to "0". Adding inline comments would help future maintainers understand the purpose without needing to reference external PRs/issues.

    Example:

    labels:
      # Changed from "1" to "0" to route jobs to the new Jenkins target as part of migration #4959
      master: "0"
  • Testing & Verification
    This kind of CI configuration change can break job scheduling if labels are incorrect. The PR should ideally include notes or evidence of testing — for example, confirmation that jobs are now correctly routed to the target Jenkins, and older Jenkins no longer picks them up.

    Suggestion: Include details in the PR description about how this migration was tested or validated, or add a checklist for manual verification.


No critical issues were found since this is a config-only change with straightforward label edits. The main recommendations are around maintainability, clarity, and validation to ensure a smooth Jenkins migration.

@wuhuizuo

wuhuizuo commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/retest

@ti-chi-bot

ti-chi-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown

@wuhuizuo: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-verify-jenkins-migration 5716f4b link true /test pull-verify-jenkins-migration

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants