Skip to main content

Parse build logs out of OpenShift’s Python Source-To-Image (s2i) builds that use Thoth s2i container images.

This tool finds structure in an unstructured build logs of OpenShift’s s2i and produces a JSON document describing all the actions taken during an OpenShift s2i build process together with additional metadata that can be obtained purely from OpenShift’s build logs.

The prerequisite for using this tool is to use Thoth’s Python s2i container images that use Thoth as a recommendation engine for Python software stacks and micropipenv for installing dependencies. The build logs produced during s2i builds are still user friendly when directly browsing them in an OpenShift cluster, but can be used for data mining and additional analysis (e.g. build breaking package).

Usage

Point this tool to a log obtained from the cluster:

# Obtain logs using:
#   oc logs user-api-469-build -n thoth-test-core > log.txt
# or for the most recent build:
#   oc logs -f bc/user-api -n thoth-test-core > log.txt
thoth-buildlog-parser parse --input log.txt

And that’s it. The tool will produce a JSON document describing the build process with all the metadata.

Example input & output

You can find some example inputs and example outputs in tests/data/ directory.

Installation

This tool is packages and published on PyPI so you can issue one of the following commands to install it:

pip install thoth-buildlog-parser
pipenv install thoth-buildlog-parser

After installing this tool, a new command should be available:

thoth-buildlog-parser --help

Running from Git

To run this tool directly from the Git repo:

git clone git@github.com:thoth-station/buildlog-parser.git  # or use https
cd buildlog-parser
pipenv install --dev
PYTHONPATH=. pipenv run python3 ./thoth-buildlog-parser parse --help

Release files for thoth-buildlog-parser 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for thoth-buildlog-parser 0.1.0
File Size Uploaded
thoth-buildlog-parser-0.1.0.tar.gz 38.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for thoth-buildlog-parser 0.1.0
File Interpreter ABI Platform
thoth_buildlog_parser-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 47.7 kB

Release files / thoth-buildlog-parser-0.1.0.tar.gz

Download URL thoth-buildlog-parser-0.1.0.tar.gz
Size 38.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5fb78d2c577b52313e5af28d4a30ec9acad99a056abdf80f87aa896689ac2c7e
BLAKE2b-256 checksum
How to use checksums
e7c4e02833852e1acb4817dffe67f4abc1e5a35edf0e5d1a20b9aec0803abec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

Release files / thoth_buildlog_parser-0.1.0-py3-none-any.whl

Download URL thoth_buildlog_parser-0.1.0-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcb295f48a6b7c5d305e3587fa06f26fba21878caa47b0e8443cb82e022748ee
BLAKE2b-256 checksum
How to use checksums
70905ed38263add475f7c6e49331027c1ce31d8bb1e4bc9745d9547983f129bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page