Repository navigation
CI - Measure the repository size on development and the pull request only - #10865
Conversation
…only Check repo size cloned every branch of dataplat/dbatools before it checked out the pull request, so a branch that has nothing to do with the pull request counted as well. Since the branch native-release was pushed on 2026-11-19 with about 7.6 MB of assemblies, the measured size went from 101,402 KiB (2026-11-16) to 110,375 KiB, and the check fails on every pull request, also on #10862 from a fork. The clone now takes development only. gh pr checkout fetches only the branch of the pull request, but in a clone of one branch it cannot track that branch ("starting point ... is not a branch"), because the fetch refspec covers development only; the refspec is widened before the checkout, which still fetches just that one branch. A failed checkout now fails the step: before, it measured development alone and passed. The script of the step, run locally with the wrapper of shell: pwsh: 100,326 to 100,335 KiB for #10863 and #10864 (branches in this repository) and for #10862 (fork), and a failure for a pull request that does not exist. A pull request from an outdated clone carries the old history in its own commits, which the checkout fetches, so the check still catches it. (do Get-DbaManagementObject) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Ahh I just fixed this on dev. We should be set. |
(do dbatools)
|
Wait what it's complex like this? I thought it was just the size that grew over time. |
|
Not over time: Your raise to 125,480 KiB makes the check green again. What this pull request would add:
The If the raise is enough for you, I'll close this pull request. This text was created by Claude and reviewed by Andreas Jordan. |
|
deal 👍🏼 |
Problem
"Check repo size" fails on every pull request since 2026-11-19, also on #10862 from a fork, whatever the pull request changes. The step clones every branch of
dataplat/dbatoolsand then checks out the pull request, so branches that have nothing to do with the pull request count as well. The branchnative-release(pushed 2026-11-19, 15 commits of its own with about 7.6 MB of assemblies such asmsodbcsql17.dlland the Replication, RMO and DTS libraries) moved the measured size over the limit:developmentdid not change between the first two runs.Change
developmentonly (--single-branch --branch development).gh pr checkoutcannot track the branch of a pull request from this repository ("cannot set up tracking information; starting point 'origin/...' is not a branch"), because the fetch refspec coversdevelopmentonly. The refspec is widened before the checkout.gh pr checkoutstill fetches just the branch of the pull request (git fetch origin +refs/heads/<branch>:refs/remotes/origin/<branch> --no-tags, seen withGIT_TRACE).developmentalone, and a pwsh step ends with the exit code of its last command, so it passed.The limit of 105,000 KiB and its comments are unchanged. A pull request from an outdated clone carries the old history in its own commits, which the checkout fetches, so the check still catches it.
Tests
The script of the step, run locally with the wrapper of
shell: pwsh($ErrorActionPreference = "stop"before,exit $LASTEXITCODEafter) and a fresh clone each time:The run of "Check repo size" on this pull request uses the changed workflow: it checked out
ci-reposize-single-branchat7542525d6and measured 100,302 KiB.Suggestion: one line ending in the file
reposize.ymlmixes line endings: 32 of its 51 lines end in CRLF and 19 in LF (24 and 19 before this pull request)..gitattributessets* -text, so Git keeps them as they were committed. This pull request leaves them alone, so that its diff shows only the change; the new lines end in CRLF like the lines around them.If you agree, an additional commit converts the whole file to LF, which 14 of the 19 workflows use (
xplat-import.ymlis CRLF). That commit touches every line of the file, which is why it would come as a commit of its own and not inside the fix.gallery.yml,integration-tests.yml,integration-tests-s3.ymland.gitignoremix line endings as well; they could get the same in a pull request of their own.🤖 Generated with Claude Code