Skip to main content

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 test

CLI Usage

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

Authentication

Unauthenticated GitHub API requests are limited to 60 per hour, which a single PR inspection can exhaust, and GitHub Actions job logs require authentication altogether. By default, the token is therefore resolved in this order:

  1. the GITHUB_TOKEN environment variable,
  2. the token of a logged-in gh CLI (gh auth token),
  3. no token — requests are sent unauthenticated.

So running gh auth login once is enough to stay clear of the rate limit. Use --gh to require the gh CLI token (the command fails if gh is missing or logged out), or --no-gh to never invoke gh and only use GITHUB_TOKEN:

cf-job-logs --gh list-jobs <pr_url>
cf-job-logs --no-gh list-jobs <pr_url>

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>

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.4.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.4.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cf_job_logs-0.4.0.tar.gz
Algorithm Hash digest
SHA256 28e8a45fd480bf8c3967d0b725606a3d84397ef4bd6e642e655916079488f7fe
MD5 e78aa8eb2565b307d96a6399d7b0b431
BLAKE2b-256 45f0ac2feadaca21e570750ab567dbf1e0f707141eb893565131368870ccc7c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for cf_job_logs-0.4.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.4.0-py3-none-any.whl.

File metadata

  • Download URL: cf_job_logs-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cf_job_logs-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 099227e6a34dc69446da1351d6b8d80fff0e2463103f0050112e11b93d32d630
MD5 11638ee589ca2cf3b4484139f6c816d3
BLAKE2b-256 c9e3a5a5a2485d839fb9a6b452bdf2855c1601429530f395b38efeb8e394cd28

See more details on using hashes here.

Provenance

The following attestation bundles were made for cf_job_logs-0.4.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.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

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