From: Patrick Donnelly Date: Sat, 11 Jul 2026 18:00:20 +0000 (-0400) Subject: script/ptl-tool: cleanup conflict review X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9c7bb73765e60c34c66de1a0582c419eae3723a4;p=ceph.git script/ptl-tool: cleanup conflict review Put it at the end, collapse it, and improve suggestions. Signed-off-by: Patrick Donnelly --- diff --git a/src/script/ptl-tool.py b/src/script/ptl-tool.py index ae1ddcfec6b..cba6a253b2a 100755 --- a/src/script/ptl-tool.py +++ b/src/script/ptl-tool.py @@ -216,13 +216,21 @@ class AuditReport: def get_consolidated_text(self) -> str: blocks = [] + conflict_blocks = [] for cat, text in self._get_active_issues(): - if text: + if not text: + continue + if cat in ("Conflict/Deviation"): + conflict_blocks.append(text) + else: blocks.append(text) - if self.visualizer_md_table and blocks: + if self.visualizer_md_table and (blocks or conflict_blocks): blocks.append(f"### Commit Parity Visualizer\n\n{self.visualizer_md_table}") + # Conflict review at the end: + blocks.extend(conflict_blocks) + blocks.append(textwrap.dedent("""\n\n 🛟 **Need Help?** @@ -1241,9 +1249,15 @@ class ConflictSimulationCheck(BaseAuditCheck): if recorded_deviations: md_text = """ - ### Automated Backport Parity Review - Backport Deviation Alert + ### Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations - A conflict or unapproved deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits. + **⚠️ WARNING: Cherry-pick conflicts or deviations were found that require component lead review.** + + A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits. + + **This does not necessarily indicate an issue but a maintainer should review.** + +
**Click to expand conflict summaries.** """ md_text = textwrap.dedent(md_text) @@ -1263,6 +1277,8 @@ class ConflictSimulationCheck(BaseAuditCheck): md_text += f"**Range Diff**\n
Click to expand\n\n```diff\n{dev['diff_text']}\n```\n
\n\n" footer = """ +
+ **How to proceed:** * **Authors (Genuine Conflicts):** If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You **must** explain the conflict resolution in the commit message (e.g., leave the standard Git `Conflicts:` block intact) and include an explanation for changes. * **Authors (Need Help?):** Reach out to the Component Lead for technical guidance on complex code conflicts.