Skip to main content

A utility for fetching and structuring conda-forge Azure CI logs into clean, agent-readable artifacts.

Project description

cf-job-logs

CI conda-forge pypi-version python-version

A utility for fetching and structuring conda-forge CI logs (Azure Pipelines and GitHub Actions) into clean, agent-readable artifacts.

Installation

This project is managed by pixi. You can install the package in development mode using:

git clone https://github.com/Quantco/cf-job-logs
cd cf-job-logs

pixi run pre-commit-install
pixi run postinstall
pixi run test

CLI Usage

The cf-job-logs CLI provides commands to inspect CI jobs for a conda-forge PR.

List jobs

List failed jobs (default) for a PR:

cf-job-logs list-jobs https://github.com/conda-forge/some-feedstock/pull/123

List all jobs (including succeeded):

cf-job-logs list-jobs --all https://github.com/conda-forge/some-feedstock/pull/123

Download a job log

Use a job ID from the list-jobs output to download its log (sanitized by default):

cf-job-logs download-log https://github.com/conda-forge/some-feedstock/pull/123 <job_id>

Use --no-sanitize to get the raw log with timestamps:

cf-job-logs download-log --no-sanitize https://github.com/conda-forge/some-feedstock/pull/123 <job_id>

Output goes to stdout, so you can redirect it to a file:

cf-job-logs download-log <pr_url> <job_id> > build.log

Wait for CI

Wait for all CI checks to complete on a PR, then report which passed or failed:

cf-job-logs wait-for-ci https://github.com/conda-forge/some-feedstock/pull/123

Customize the polling interval and timeout:

cf-job-logs wait-for-ci --interval 60 --timeout 3600 <pr_url>

By default, --fail-fast is enabled: the command returns as soon as any check fails without waiting for the rest. Use --no-fail-fast to wait for all checks to complete.

The command exits with code 0 if all checks pass, or 1 if any check fails or the timeout is reached.

Note: wait-for-ci reports check-run level results (name + pass/fail). To get job IDs for download-log, use list-jobs after wait-for-ci completes.

Recommended agent workflow

# 1. Wait for CI to finish
cf-job-logs wait-for-ci --json <pr_url>

# 2. If something failed, get the job IDs
cf-job-logs list-jobs --json <pr_url>

# 3. Download the log for a specific failed job
cf-job-logs download-log <pr_url> <job_id>

JSON output

All commands that produce tabular output support --json for machine-readable output:

cf-job-logs list-jobs --json <pr_url>
cf-job-logs wait-for-ci --json <pr_url>

Verbose mode

Add -v for debug logging:

cf-job-logs -v list-jobs https://github.com/conda-forge/some-feedstock/pull/123

Running via pixi

All commands can also be run through pixi:

pixi run cf-job-logs list-jobs <pr_url>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cf_job_logs-0.3.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cf_job_logs-0.3.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file cf_job_logs-0.3.0.tar.gz.

File metadata

  • Download URL: cf_job_logs-0.3.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cf_job_logs-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d78104549de7cc91939bd16d748b968a87723fa83a3e1c504d7bada0434319df
MD5 908126f9b099342fb749910d6023746e
BLAKE2b-256 23f6c96518f7cbaa77a6076062102d8754c3fff59a430f270873c2a88efe126e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cf_job_logs-0.3.0.tar.gz:

Publisher: build.yml on Quantco/cf-job-logs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cf_job_logs-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: cf_job_logs-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cf_job_logs-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c0300928d82a9fd26bf0f4e58bffda0762f67207f10fac6701e471facb4d65e
MD5 93d0c05cb7421b91911b987938c2b3b8
BLAKE2b-256 681b4d7ad2339967a8de1026a0a36b2c032ff15d8b61040f3f41fdf844e1d983

See more details on using hashes here.

Provenance

The following attestation bundles were made for cf_job_logs-0.3.0-py3-none-any.whl:

Publisher: build.yml on Quantco/cf-job-logs

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page