Skip to content

ci(prow): add ci repo seed postsubmit job#4347

Open
wuhuizuo wants to merge 2 commits intomainfrom
feature/prow-job-to-call-jenkins-seed-job
Open

ci(prow): add ci repo seed postsubmit job#4347
wuhuizuo wants to merge 2 commits intomainfrom
feature/prow-job-to-call-jenkins-seed-job

Conversation

@wuhuizuo
Copy link
Copy Markdown
Contributor

Summary

  • add a Jenkins-backed Prow postsubmit for PingCAP-QE/ci on main
  • trigger the top-level Jenkins job seed with status context seed
  • update prow-jobs/kustomization.yaml to include the new postsubmit config

Verification

  • git diff --check
  • git diff --cached --check before commit

Notes

  • confirmed the Jenkins endpoint exists at https://do.pingcap.net/jenkins/job/seed/
  • did not run full Prow checkconfig locally

@ti-chi-bot
Copy link
Copy Markdown

ti-chi-bot bot commented Mar 12, 2026

[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 purelind 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

Copy link
Copy Markdown

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

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 adds a new Jenkins-backed Prow postsubmit job for the PingCAP-QE/ci repository, targeting the main branch. The job triggers the top-level Jenkins seed job and is configured with a specific status context and concurrency settings. The changes include adding a new postsubmits.yaml file with the job definition and updating kustomization.yaml to include this new config. The implementation is straightforward and mostly aligns with existing patterns, but lacks some validation and documentation enhancements.


Critical Issues

  • No Prow config validation performed
    • File: N/A (mentioned in PR notes)
    • Why: The PR notes mention that the full prow checkconfig was not run locally. Without this, there's risk the new postsubmit config could have syntax or structural errors that cause runtime issues.
    • Suggestion: Always run prow checkconfig locally to validate the entire Prow config before merging, or set up a presubmit job that does this automatically.

Code Improvements

  • Set decorate usage and comment clarity

    • File: prow-jobs/pingcap-qe/ci/postsubmits.yaml (line 7)
    • Why: The comment # need add this. is unclear and grammatically incorrect, making it harder for others to understand why decorate: false is set. Also, it is unusual to disable decoration entirely for Prow jobs unless there is a specific reason.
    • Suggestion: Clarify the comment or provide a more descriptive one, e.g.:
      decorate: false # Disable Prow decoration as Jenkins job manages its own environment
      Or if decoration is needed, reconsider this setting.
  • Add explicit agent: jenkins field for clarity

    • While agent: jenkins is set, ensure this aligns with your Prow cluster setup. If Jenkins jobs require additional parameters (like jenkins_job or jenkins_url), consider including them explicitly or documenting them in comments.
  • Consider adding skip_report or optional flags if appropriate

    • If this postsubmit job is not critical for all merges or can be noisy, adding flags to control reporting or optional execution could improve user experience.

Best Practices

  • Add documentation/comments for the Jenkins job integration

    • File: prow-jobs/pingcap-qe/ci/postsubmits.yaml (top of file)
    • Why: There is no explanation of what this postsubmit job does, the reason for using Jenkins, or any special considerations. This reduces maintainability.
    • Suggestion: Add a brief comment block describing the purpose, Jenkins job URL, and any required credentials or setups, e.g.:
      # Postsubmit job to trigger the Jenkins 'seed' job for CI repository.
      # Jenkins job URL: https://do.pingcap.net/jenkins/job/seed/
      # This job runs only on 'main' branch after successful merge.
  • Add a test or presubmit job that validates the new postsubmit config

    • To avoid regression, consider adding or updating CI to run prow checkconfig for this new file.
  • Naming conventions

    • The job name seed is concise but generic; if multiple Jenkins jobs exist, consider a more descriptive name to avoid confusion in Prow status contexts, e.g., jenkins-seed or ci-seed.

Minor Suggestions

  • kustomization.yaml ordering
    • The new entry in configMapGenerator is inserted between periodics and presubmits; double-check this ordering matches your repository conventions for better readability.

Summary of actionables:

  • Run prow checkconfig before merging
  • Clarify or improve comments around decorate: false
  • Add documentation for the Jenkins-backed postsubmit job
  • Add test coverage or presubmit validation for config changes
  • Consider more descriptive job naming if appropriate

Addressing these will improve the reliability, clarity, and maintainability of the new CI job integration.

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces automation for the PingCAP-QE/ci repository by configuring a new Prow postsubmit job. This job will automatically trigger a specific Jenkins seed job upon merges to the main branch, streamlining the continuous integration process for this repository.

Highlights

  • New Prow Postsubmit Job: A Jenkins-backed Prow postsubmit job has been added for the PingCAP-QE/ci repository, specifically targeting the main branch.
  • Jenkins Job Trigger: This new postsubmit job is configured to trigger the top-level Jenkins job named seed with a corresponding status context of seed.
  • Configuration Update: The prow-jobs/kustomization.yaml file was updated to include the reference to the newly created pingcap-qe_ci_postsubmits.yaml configuration.
Changelog
  • prow-jobs/kustomization.yaml
    • Added a new entry to reference the pingcap-qe_ci_postsubmits.yaml file, integrating the new postsubmit configuration into the Prow job definitions.
  • prow-jobs/pingcap-qe/ci/postsubmits.yaml
    • Created a new file defining a Prow postsubmit job for the PingCAP-QE/ci repository. This job is configured to run on the main branch, use a Jenkins agent, and trigger the seed Jenkins job with a seed context.
Activity
  • No human activity (comments, reviews, etc.) has occurred on this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ti-chi-bot ti-chi-bot bot added the size/S label Mar 12, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new Prow postsubmit job for the PingCAP-QE/ci repository, which triggers the seed Jenkins job upon merges to the main branch. The configuration in kustomization.yaml is updated accordingly. The changes are straightforward and correct. I have one suggestion to improve the clarity of a comment in the new configuration file.

Remove global branches anchor and set seed job branches explicitly to
^main$. Keep branch config local and ensure the seed postsubmit runs
only when Jenkins job groovy files under jobs/ change.
Copy link
Copy Markdown

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

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 adds a Jenkins-backed Prow postsubmit job for the PingCAP-QE/ci repository on the main branch. It introduces a new postsubmit YAML file with the job definition, updates the kustomization.yaml to include this new file, and configures the job to trigger the top-level Jenkins seed job with the seed status context. The overall approach is straightforward and aligns with existing Prow job configurations. The patch is concise and mostly well-structured.


Critical Issues

  • Missing Prow config validation (checkconfig)
    • File: N/A (general)
    • Issue: The PR notes that the full Prow checkconfig was not run locally. This is critical because the new postsubmit config might have syntax or semantic errors that could break Prow job loading at runtime.
    • Suggested fix: Run the Prow checkconfig command against the updated configuration to validate the new postsubmit YAML and the kustomize setup before merging. This prevents runtime failures.

Code Improvements

  • decorate: false justification and implications

    • File: prow-jobs/pingcap-qe/ci/postsubmits.yaml (lines 5-6)
    • Issue: The decorate: false field is set with a comment "need add this." However, decorating disables typical Prow decoration features like cloning and environment setup, which might affect logs and artifacts. The comment is vague and could confuse maintainers about why decoration is disabled.
    • Suggested fix: Add a clearer comment explaining why decorate: false is necessary here (e.g., "Disable decoration because Jenkins agent handles clone and environment setup"). If disabling decoration is not strictly needed, consider enabling it for consistency with other jobs.
  • run_if_changed pattern specificity

    • File: prow-jobs/pingcap-qe/ci/postsubmits.yaml (line 12)
    • Issue: The regex ^jobs/.*\.groovy matches any changes under the jobs/ directory with .groovy files. This might be too broad or narrow depending on the repository structure and job triggering needs.
    • Suggested fix: Verify that this pattern precisely matches the intended files that should trigger the seed job. If the job should run on more or fewer files, adjust accordingly. For example, if only top-level Groovy job files are relevant, refine the regex.
  • Use of max_concurrency: 1

    • File: prow-jobs/pingcap-qe/ci/postsubmits.yaml (line 14)
    • Issue: Limiting concurrency to 1 serializes job runs, which might delay postsubmit pipelines if multiple commits are pushed rapidly.
    • Suggested fix: Confirm whether this is necessary due to Jenkins job constraints. If not, consider increasing concurrency or removing this limit, balancing load and resource usage.

Best Practices

  • Add a comment block or README update for the new postsubmit job

    • File: prow-jobs/pingcap-qe/ci/postsubmits.yaml (top of file)

    • Issue: The new job lacks descriptive comments explaining its purpose, triggering conditions, and Jenkins integration details. This reduces maintainability for other contributors.

    • Suggested fix: Add a comment at the top of the file, e.g.:

      # Postsubmit job to trigger the Jenkins 'seed' job on changes to Groovy job files.
      # Runs on main branch only. Uses Jenkins agent, no decoration.
  • Testing coverage and verification

    • File: N/A (general)
    • Issue: No mention of integration tests or CI pipeline tests to verify the new postsubmit job triggers and behaves as expected.
    • Suggested fix: If possible, add automated tests or manual verification steps that confirm the postsubmit job runs correctly on relevant pushes.
  • YAML formatting consistency

    • File: prow-jobs/pingcap-qe/ci/postsubmits.yaml
    • Issue: The YAML uses anchor and merge keys (&jenkins_job and <<), which is good, but the indentation and spacing could be reviewed to align with existing repo style for readability.
    • Suggested fix: Ensure consistent indentation (2 spaces preferred) and spacing after colons for readability.

Summary of actionable next steps:

  1. Run prow checkconfig locally to validate the new job configuration before merging.
  2. Clarify the purpose of decorate: false with a more informative comment or reconsider its necessity.
  3. Verify and possibly refine the run_if_changed regex to precisely target intended files.
  4. Add descriptive comments/documentation to the new postsubmit YAML file for maintainability.
  5. Consider adding testing or manual verification instructions for the new job.

Addressing these points will improve the reliability, maintainability, and clarity of this Prow postsubmit addition.

@wuhuizuo wuhuizuo added this to the Governance-2026 milestone Mar 12, 2026
ti-chi-bot bot pushed a commit to PingCAP-QE/ee-ops that referenced this pull request Apr 4, 2026
## Summary
- remove the direct GitHub webhook trigger from the top-level `seed` job
on `prow.tidb.net/jenkins`
- keep the seed DSL generation logic unchanged
- document that this job is now triggered by the Prow postsubmit added
in `PingCAP-QE/ci#4347`

## Why only GCP
- the earlier conclusion was wrong because it only looked at
`JENKINS_BASE_URL` and missed the job label
- `ci#4347` defines the new postsubmit with `labels.master: "1"`
- in `apps/gcp/prow/release/release.yaml`, `master=1` is handled by the
`dedicated-for-ticdc` Jenkins operator instance, which uses
`JENKINS_BASE_URL_TICDC=https://prow.tidb.net/jenkins`
- that maps to `apps/gcp/jenkins/beta`, not `apps/prod/jenkins/release`
or `apps/prod2/jenkins/beta`
- so the minimal compatible fix is to update the GCP seed job only and
avoid changing unrelated Jenkins deployments

## Testing
- `git diff --check`
- `rg -n "job\('seed'\)|githubPush\(\)|queue\('seed'\)"
apps/gcp/jenkins/beta/release/values-JCasC.yaml
apps/prod/jenkins/release/values-JCasC.yaml
apps/prod2/jenkins/beta/release/values-JCasC.yaml`

```release-note
none
```
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.

1 participant