Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concurrent git show intermittent truncation at 8192 characters #795

Open
smikulcik opened this issue May 13, 2022 · 0 comments
Open

concurrent git show intermittent truncation at 8192 characters #795

smikulcik opened this issue May 13, 2022 · 0 comments

Comments

@smikulcik
Copy link

smikulcik commented May 13, 2022

When I try to do a concurrent git-show with simple-git, occasionally I see truncation after 8192 characters.

On my machine, I'll see it fail about once every 300-2000 tries.

Here's a sample script replicating the error:

const { default: simpleGit } = require('simple-git')
const git = simpleGit()
Promise.all(Array(10000).fill().map(async (_, i)=>{
  const resp = await git.raw(['show', 'master:./my/file'])
  if (i >0 && i % 1000 === 0){
    console.log(`So far, ${i} Successful`)
  }
  if (resp.length != 13043) {
    console.log(resp)
    console.log(`Failed to fetch the full page after ${i} tries: Actual num bytes: ${resp.length} Expected: 13043`)
    process.exit(1)
  }
}))

My system

{
  npm: '8.10.0',
  node: '16.13.2',
  v8: '9.4.146.24-node.14',
  uv: '1.42.0',
  zlib: '1.2.11',
  brotli: '1.0.9',
  ares: '1.18.1',
  modules: '93',
  nghttp2: '1.45.1',
  napi: '8',
  llhttp: '6.0.4',
  openssl: '1.1.1l+quic',
  cldr: '39.0',
  icu: '69.1',
  tz: '2021a',
  unicode: '13.0',
  ngtcp2: '0.1.0-DEV',
  nghttp3: '0.1.0-DEV'
}
"simple-git": {
      "version": "3.7.1",
      "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.7.1.tgz",
      "integrity": "sha512-+Osjtsumbtew2y9to0pOYjNzSIr4NkKGBg7Po5SUtjQhaJf2QBmiTX/9E9cv9rmc7oUiSGFIB9e7ys5ibnT9+A==",
      "requires": {
        "@kwsites/file-exists": "^1.1.1",
        "@kwsites/promise-deferred": "^1.1.1",
        "debug": "^4.3.3"
      }
    }

EDIT: I removed the concurrent processes setting and I still see it failing in the same way

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

No branches or pull requests

1 participant