pickman: Skip push pipeline for rebases to avoid duplicates
When rebasing MRs, two CI pipelines are triggered: one for the push and another when GitLab detects the MR source branch update. Also, the MR title can inadvertently be changed during rebases. Fix this by: - Removing --run-ci flag from the push-branch command in the review agent prompt (GitLab triggers an MR pipeline automatically) - Adding an instruction not to update the MR title during rebases Update the CI Pipelines documentation to reflect that all pushes (both initial and updates) skip the push pipeline. Co-developed-by: Claude <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -165,31 +165,25 @@ This ensures:
|
||||
CI Pipelines
|
||||
------------
|
||||
|
||||
Pickman manages CI pipelines to avoid unnecessary runs while ensuring changes
|
||||
are properly verified.
|
||||
Pickman manages CI pipelines to avoid unnecessary duplicate runs. GitLab
|
||||
automatically triggers an MR pipeline whenever the source branch is updated,
|
||||
so pickman skips the push pipeline to avoid running two pipelines.
|
||||
|
||||
**Initial MR creation**
|
||||
**How it works**
|
||||
|
||||
When creating a new MR (via ``apply -p`` or ``step``), pickman pushes the
|
||||
branch with ``-o ci.skip``. This skips the push pipeline because GitLab
|
||||
automatically triggers an MR pipeline when the merge request is created.
|
||||
Without this, two pipelines would run: one for the push and one for the MR.
|
||||
|
||||
**Review comment handling**
|
||||
|
||||
When pushing changes after addressing review comments (via ``review``,
|
||||
``step``, or ``poll``), pickman does NOT skip the pipeline. A new pipeline
|
||||
is needed to verify that the changes made in response to review feedback
|
||||
are correct.
|
||||
When pushing a branch (for new MRs or updates), pickman uses ``-o ci.skip``
|
||||
to skip the push pipeline. GitLab then triggers an MR pipeline when it
|
||||
detects the branch update on the merge request. This ensures exactly one
|
||||
pipeline runs for each push.
|
||||
|
||||
**Summary**
|
||||
|
||||
=============================== ================ =========================
|
||||
=============================== ================ ==============================
|
||||
Action Pipeline Skipped Reason
|
||||
=============================== ================ =========================
|
||||
Initial branch push for new MR Yes MR creation triggers one
|
||||
Push after review changes No Need to verify changes
|
||||
=============================== ================ =========================
|
||||
=============================== ================ ==============================
|
||||
Initial branch push for new MR Yes MR creation triggers pipeline
|
||||
Push after rebase/review Yes MR update triggers pipeline
|
||||
=============================== ================ ==============================
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
@@ -297,8 +297,8 @@ Steps to follow:
|
||||
4. Run 'buildman -L --board sandbox -w -o /tmp/pickman' to verify the build
|
||||
5. Create a local branch with suffix '-v2' (or increment: -v3, -v4, etc.)
|
||||
6. Force push to the ORIGINAL remote branch to update the MR:
|
||||
./tools/pickman/pickman push-branch {branch_name} -r {remote} -f --run-ci
|
||||
(--run-ci triggers a pipeline to verify the rebased changes)
|
||||
./tools/pickman/pickman push-branch {branch_name} -r {remote} -f
|
||||
(GitLab automatically triggers an MR pipeline when the branch is updated)
|
||||
7. Report what was done and what reply should be posted to the MR
|
||||
|
||||
Important:
|
||||
@@ -306,7 +306,7 @@ Important:
|
||||
- If a comment is unclear or cannot be addressed, note this in your report
|
||||
- Local branch: {branch_name}-v2 (or -v3, -v4 etc.)
|
||||
- Remote push: always to '{branch_name}' to update the existing MR
|
||||
- Always use --run-ci when pushing rebases/updates to trigger verification
|
||||
- Do NOT update the MR title - it should remain as originally set
|
||||
"""
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user