Ray's Knowledge Base
Unlock

Release dftracer by tagging the package version and publishing a GitHub release

RecipeVerified 30 Sep 2026Holds project: dftracer
Recipe. When to use it, the steps, and what showed that they work.

When to use#

Use this to cut a dftracer release to PyPI.

Steps#

  1. Bump the library version in VERSION (4.x) with script/repo/update_version.sh. Commit it through a PR to develop. develop is the default branch; master is far behind.
  2. Pick the tag from the PACKAGE version (2.x), not from VERSION. Past pairs: v2.0.3 with lib 4.1.0, v2.1.0 with 4.2.0, v2.1.1 with 4.2.1. The "next steps" that update_version.sh prints say git tag v<VERSION>. That is wrong: it would publish dftracer 4.x to PyPI.
  3. Wait for CI on develop to pass.
  4. Create a GitHub release: gh release create v2.2.0 --target develop --generate-notes. A tag push alone does not publish to PyPI. python-publish.yml runs only when a release is published. A v* tag push starts docker-publish.yml.
  5. python-publish.yml builds the wheels (cp39 to cp314, manylinux 2.28) through wheels.yml, plus an sdist, and uploads them with PYPI_TOKEN.

Checks before release:

  • In a throwaway clone, add the tag locally and run scripts/wheel/build_wheels.sh --list | grep 'wheel version'. It must print the tag without v.
  • Download the latest .postN wheel with pip download --platform manylinux_2_28_x86_64 --only-binary :all: and check its RECORD against its zip entries.
  • Smoke test in python:3.12-slim with --platform linux/amd64: DFTRACER_ENABLE=1 DFTRACER_LOG_FILE=/tmp/trace DFTRACER_DATA_DIR=all python t.py, then look for POSIX events in /tmp/trace*.pfw.gz. With initialize_log(logfile=...) and no DFTRACER_LOG_FILE, the file did not appear where I expected.

Note: develop prereleases are <tag>.postN. PyPI counts .postN as a final release, so a plain pip install dftracer gets them. The README says --pre is needed; that is not true.

Evidence#

Read from .github/workflows/{python-publish,prerelease,wheels,docker-publish}.yml and scripts/wheel/build_wheels.sh resolve_version on 2026-09-30. With a local v2.2.0 tag, the wheel script and setup.py myversion_func both gave 2.2.0, also with a dirty tree. PyPI info.version was 2.1.1.post45. The post45 cp312 wheel installed and traced open64, read, write, lseek64 and close.

Also found by searching

  • update_version.sh says git tag v4.3.0 but PyPI should get dftracer 2.x
  • which tag do I use when releasing dftracer, the VERSION file or package version
  • how do I cut a dftracer release to PyPI with a GitHub release
  • dftracer release develop default branch gh release create v2.2.0 --target develop
  • update_version.sh next steps says git tag v4.2.1 and I worried it will publish dftracer 4.x to PyPI
  • pushed a v* tag but nothing got uploaded to PyPI for dftracer
  • how do I cut a dftracer release to PyPI, which tag and gh release command?