Skip to content

docs(scm): document singleBranch/depth performance option#3514

Open
kuisathaverat wants to merge 1 commit into
updatecli:masterfrom
kuisathaverat:docs/singlebranch-scm-checkout-performance
Open

docs(scm): document singleBranch/depth performance option#3514
kuisathaverat wants to merge 1 commit into
updatecli:masterfrom
kuisathaverat:docs/singlebranch-scm-checkout-performance

Conversation

@kuisathaverat

Copy link
Copy Markdown

Problem

updatecli/updatecli#9590 introduces a new opt-in depth + singleBranch combination for git-based scm plugins (github, gitlab, gitea, bitbucket, stash, azuredevops, git) that lets Updatecli skip fetching every branch, tag, and ref on the remote during checkout. On repositories with hundreds of branches/tags and hundreds of thousands of commits, this reduced checkout time from ~19 minutes to ~43 seconds.

The parameter reference table on each scm doc page ({{< resourceparameters "scms" "..." >}}) is auto-generated from the JSON schema in content/en/schema/latest/policy/manifest/config.json, which is refreshed automatically by the jsonschema pipeline (updatecli/updatecli.d/jsonschema.yaml) once a new Updatecli release ships with the field. That part requires no manual change here.

However, none of the scm doc pages had prose/examples explaining why and how to use this option, so users are unlikely to discover it.

Solution

Added a new "Performance on large repositories" subsection to each of the 7 affected scm doc pages:

  • content/en/docs/plugins/scm/github.adoc
  • content/en/docs/plugins/scm/gitlab.adoc
  • content/en/docs/plugins/scm/gitea.adoc
  • content/en/docs/plugins/scm/bitbucket.adoc
  • content/en/docs/plugins/scm/stash.adoc
  • content/en/docs/plugins/scm/azuredevops.adoc
  • content/en/docs/plugins/scm/git.adoc

Each subsection explains:

  • The default behavior (fetching every ref) and why it's slow on large repos.
  • How depth: 1 + singleBranch: true scopes the checkout to just the configured branch.
  • A trade-off callout (NOTE:) about reduced visibility into other branches/tags when enabled (e.g. duplicate-PR detection).

A corresponding runnable example yaml file was added for each plugin under assets/code_example/docs/plugins/..., following the same include pattern already used by the existing "Default"/"CommitMessage" examples on each page.

Related

Adds a new 'Performance on large repositories' subsection to each scm
plugin doc (github, gitlab, gitea, bitbucket, stash, azuredevops, git)
explaining the new singleBranch option (paired with depth) that lets
Updatecli skip fetching every branch, tag, and ref on the remote,
along with a runnable example for each plugin.

Related to updatecli/updatecli#9590.

Co-authored-by: Copilot App <223556219+Copilot@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