jfrog / build-info-go

build-info-go is a Go library and a CLI, which allows generating build-info for a source code project.
https://www.buildinfo.org
Apache License 2.0
61 stars 34 forks source link

Python log parser - handle limited size log content #213

Closed attiasas closed 7 months ago

attiasas commented 7 months ago

We have cases when installing that the log content has limited size and the content is split to multiple content, for example with pipenv:

Looking in indexes: 
***localhost:8081/artifactory/api/pypi/cli-pipenv-pypi-virtual-16
98829624/simple

Collecting pexpect==4.8.0 (from -r 
/tmp/pipenv-hx6_n8fi-requirements/pipenv-xuuwb5sl-hashed-reqs.txt (line 1))

  Using cached 
http://localhost:8081/artifactory/api/pypi/cli-pipenv-pypi-virtual-1698829624/pa
ckages/packages/39/7b/88dbb785881c28a102619d46423cb853b46dbccc70d3ac362d99773a78
ce/pexpect-4.8.0-py2.py3-none-any.whl (59 kB)

Collecting ptyprocess==0.7.0 (from -r 
/tmp/pipenv-hx6_n8fi-requirements/pipenv-xuuwb5sl-hashed-reqs.txt (line 2))

  Using cached 
http://localhost:8081/artifactory/api/pypi/cli-pipenv-pypi-virtual-1698829624/pa
ckages/packages/22/a6/858897256d0deac81a172289110f31629fc4cee19b6f01283303e18c8d
b3/ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)

Collecting toml==0.10.2 (from -r 
/tmp/pipenv-hx6_n8fi-requirements/pipenv-xuuwb5sl-hashed-reqs.txt (line 3))

  Using cached 
http://localhost:8081/artifactory/api/pypi/cli-pipenv-pypi-virtual-1698829624/pa
ckages/packages/44/6f/7120676b6d73228c96e17f1f794d8ab046fc910d781c8d151120c3f156
9e/toml-0.10.2-py2.py3-none-any.whl (16 kB)

Installing collected packages: ptyprocess, pexpect, toml

Successfully installed pexpect-4.8.0 ptyprocess-0.7.0 toml-0.10.2

the split lines cause our code not to match the expected Regex, and we could not collect the dependencies