Skip to content

Optimise metadata by grouping deliverables - #426

Draft
tomschr wants to merge 1 commit into
mainfrom
425-git-handling
Draft

Optimise metadata by grouping deliverables#426
tomschr wants to merge 1 commit into
mainfrom
425-git-handling

Conversation

@tomschr

@tomschr tomschr commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Optimise docbuild metadata by grouping deliverables that share the same repository and branch into a single shared git worktree. This reduces the number of worktree checkout operations from one per deliverable to one per unique (repository, branch) pair, significantly reducing overhead when many DC files live on the same branch.

This PR may lead to nowhere, depending on the outcome.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown

Coverage Report

For commit de34447

Click to expand Coverage Report
  Name                                          Stmts   Miss Branch BrPart  Cover
  -------------------------------------------------------------------------------
+ src/docbuild/tasks/portal.py                    140      0     50      1  99.5%
+ src/docbuild/models/manifest.py                 156      1     32      1  98.9%
+ src/docbuild/logging.py                         104      1     26      1  98.5%
+ src/docbuild/utils/pidlock.py                    79      1     14      1  97.8%
+ src/docbuild/cli/cmd_config/list.py              28      0     10      1  97.4%
+ src/docbuild/utils/git.py                       114      4     28      0  97.2%
+ src/docbuild/cli/cmd_portal/cmd_list.py         168      1     86      7  96.9%
+ src/docbuild/models/deliverable/__init__.py      95      2     14      2  96.3%
+ src/docbuild/models/deliverable/view.py         175      3     48      6  96.0%
+ src/docbuild/cli/callback.py                     35      0     10      2  95.6%
+ src/docbuild/utils/concurrency.py                65      3     18      1  95.2%
+ src/docbuild/tasks/metadata/runner.py            76      5     18      0  94.7%
+ src/docbuild/cli/cmd_cli.py                     142      7     28      6  92.4%
+ src/docbuild/cli/cmd_metadata/__init__.py        42      2      4      2  91.3%
- src/docbuild/cli/cmd_doctor.py                   37      4     10      2  87.2%
- src/docbuild/tasks/build/runner.py               88     14     16      3  83.7%
- src/docbuild/tasks/metadata/manifest.py         130     16     48      6  83.1%
- src/docbuild/cli/cmd_config/validate.py          21      2     12      3  78.8%
- src/docbuild/tasks/metadata/daps.py             117     29     32      3  75.8%
- src/docbuild/cli/cmd_check/__init__.py           22      9      4      0  50.0%
- src/docbuild/cli/cmd_build/__init__.py           59     38      8      0  31.3%
  -------------------------------------------------------------------------------
+ TOTAL                                          4016    142   1094     48  95.8%
  
  56 files skipped due to complete coverage.

@tomschr
tomschr force-pushed the 425-git-handling branch 2 times, most recently from 7c24d9b to 20cf2bd Compare August 7, 2026 20:28
@tomschr
tomschr force-pushed the 425-git-handling branch 3 times, most recently from fef9e57 to ec1e952 Compare August 20, 2026 09:33
Optimise `docbuild metadata` by grouping deliverables that share
the same repository and branch into a single shared `git worktree`.
This reduces the number of worktree checkout operations from one per
deliverable to one per unique `(repository, branch)` pair, significantly
reducing overhead when many DC files live on the same branch.

Safely handle missing branches during deliverable grouping.

Co-authored-by: Sushant Gaurav <sushant-suse@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant