Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
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 checkconfigwas 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 checkconfiglocally to validate the entire Prow config before merging, or set up a presubmit job that does this automatically.
Code Improvements
-
Set
decorateusage 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 whydecorate: falseis 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.:
Or if decoration is needed, reconsider this setting.
decorate: false # Disable Prow decoration as Jenkins job manages its own environment
- File:
-
Add explicit
agent: jenkinsfield for clarity- While
agent: jenkinsis set, ensure this aligns with your Prow cluster setup. If Jenkins jobs require additional parameters (likejenkins_joborjenkins_url), consider including them explicitly or documenting them in comments.
- While
-
Consider adding
skip_reportoroptionalflags 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.
- File:
-
Add a test or presubmit job that validates the new postsubmit config
- To avoid regression, consider adding or updating CI to run
prow checkconfigfor this new file.
- To avoid regression, consider adding or updating CI to run
-
Naming conventions
- The job name
seedis concise but generic; if multiple Jenkins jobs exist, consider a more descriptive name to avoid confusion in Prow status contexts, e.g.,jenkins-seedorci-seed.
- The job name
Minor Suggestions
kustomization.yamlordering- The new entry in
configMapGeneratoris inserted between periodics and presubmits; double-check this ordering matches your repository conventions for better readability.
- The new entry in
Summary of actionables:
- Run
prow checkconfigbefore 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.
Summary of ChangesHello, 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 Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
checkconfigwas 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
checkconfigcommand against the updated configuration to validate the new postsubmit YAML and the kustomize setup before merging. This prevents runtime failures.
Code Improvements
-
decorate: falsejustification and implications- File:
prow-jobs/pingcap-qe/ci/postsubmits.yaml(lines 5-6) - Issue: The
decorate: falsefield 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: falseis 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.
- File:
-
run_if_changedpattern specificity- File:
prow-jobs/pingcap-qe/ci/postsubmits.yaml(line 12) - Issue: The regex
^jobs/.*\.groovymatches any changes under thejobs/directory with.groovyfiles. 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.
- File:
-
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.
- File:
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_joband<<), 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.
- File:
Summary of actionable next steps:
- Run
prow checkconfiglocally to validate the new job configuration before merging. - Clarify the purpose of
decorate: falsewith a more informative comment or reconsider its necessity. - Verify and possibly refine the
run_if_changedregex to precisely target intended files. - Add descriptive comments/documentation to the new postsubmit YAML file for maintainability.
- 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.
## 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 ```
Summary
PingCAP-QE/cionmainseedwith status contextseedprow-jobs/kustomization.yamlto include the new postsubmit configVerification
git diff --checkgit diff --cached --checkbefore commitNotes
https://do.pingcap.net/jenkins/job/seed/checkconfiglocally