Repository navigation
Conversation
Before opening the template update PR, merge TEMPLATE into the base branch in a temporary worktree. For each file git cannot merge, split the template's change into small hunks with minimal unique context and apply them to the pipeline's version of the file. If every conflict is resolved, the PR is opened from the merge commit so it can be merged without conflicts; otherwise it is opened from TEMPLATE as before. The PR body lists the resolved or conflicting files. The hunk logic is adapted from nf-migrate (https://github.com/Skitionek/nf-migrate). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merging this PR will improve performance by 22.44%
Performance Changes
Tip Curious why performance improved? Comment Comparing Footnotes |
|
@codspeedbot explain why performance improved |
Why
|
| Run | modules master |
Latest fastp commit |
Gap |
|---|---|---|---|
Base (dev 77ba349, Oct 12) |
dfdf72c |
826a9b2 (Jul 31) |
411 commits, 2,983 files |
| Head (this PR, Oct 15) | f265e4a |
cec0863 (today, nf-core/modules#13169) |
10 commits, 197 files |
Because fastp was updated upstream this morning, the checkout round trip now touches about 15× fewer files, which accounts for the ~1.1 s gain.
Other things to know
- The report compared against
77ba349, because no completed CodSpeed run exists for this PR's real base (cfba18b). The diff therefore also includes update included nf-core components #4515 and fix(lint): use repo-root-relative path ingit restorecall incontainer_configs#4301. Neither affects this path: they change template module pins and lint code. - This benchmark will keep drifting as nf-core/modules changes. If you want it to measure only the code in this repo, pin the modules cache to a fixed commit in the benchmark setup.
Comment @codspeedbot pin the modules cache in the install benchmark and I'll make that change.
Summary
- Warming up the performance wizard...
- Compare base and head runs and flame graphs — Python time unchanged; the git child processes dropped from ~2.2 s to ~0.96 s, mostly less zlib decompression
- Trace the git work in
nf-core modules install— The change comes from the state of the nf-core/modules cache, not from the PR code - Reply with explanation — Reply with explanation
- Handling comment — Comment handling finished successfully
Learnings updated. See what CodSpeed remembers about this repository.
Was this response helpful? React with 👍 or 👎 to help us improve CodSpeedBot.
- Fixed rules for generated files (RO-Crate, container configs), logos, CHANGELOG.md, .nf-core.yml and nf-core components (modules.json and the template modules/subworkflows keep the pipeline's version) - After the merge commit, update template components to the template version (never downgrading) and regenerate container configs and the RO-Crate, one commit each; failures are listed in the PR body as to-dos - Discard the resolution if hunk-resolved Nextflow files gain new `nextflow lint` errors - Use the TEMPLATE commit named by .nf-core.yml as merge base when the git history is older (squash-merged template updates) - Raise instead of treating a failed merge without conflicts as clean - PR body lists conflicts, rule resolutions, follow-up commits and warnings Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Summary
nf-core pipelines syncnow tries to resolve the merge conflicts of template update PRs before opening them, using the hunk logic from nf-migrate by @Skitionek (contributed under the MIT licence with the author's agreement).How it works
After pushing
TEMPLATE, the newresolve_merge_conflicts()step mergesTEMPLATEinto the PR base branch in a temporary git worktree, so the user's checkout is never touched:TEMPLATE) is split into small hunks with the minimal context that makes them unique (diff_hunks), and each hunk is applied to the pipeline's version of the file (apply_hunk): replaced if its old text occurs exactly once, skipped if its new text is already there, otherwise the file is left unresolved.TEMPLATE), so it merges without conflicts. The PR body lists the auto-resolved files to review.TEMPLATEas before, with the conflicting files listed in the PR body.Any git error in this step is logged as a warning and falls back to the previous behaviour.
Differences from nf-migrate
{{placeholders}}: the template diff comes from the pipeline's ownTEMPLATEbranch at sync time, so nothing needs maintaining per release, and multi-version jumps andskip_featureswork.Things for reviewers
TEMPLATEtip. It contains textual edits to pipeline-owned files, listed in the PR body. These PRs must still be merged with "Create a merge commit".Testing
tests/pipelines/test_sync_merge.py: hunk splitting,apply_hunk, and merges in a real repo (edits on neighbouring lines resolved, already-applied change resolved, real conflict left alone, clean merge needs no commit).tests/pipelines/test_sync.py: merge branch starts from the resolved merge commit, and the PR body lists the files.dev, the template's.github/workflows/branch.ymlhasHEAD_REPO: ${{(double space), which prettier reformats after the initial commit and leaves fixture pipelines dirty; locally that makes mosttest_sync.pytests fail ondevas well, independent of this PR.🤖 Generated with Claude Code