ci(release): audit guard collection fails without project dependencies

Closed
#624 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

A pull request for this has already been merged.

  • #625 by @yeongseon — merged

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
18/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
bash, github-actions, python, yaml
Domain
devops, testing-qa

Research direction

Start with the tag-only audit command in .github/workflows/publish-pypi.yml and the bare-interpreter setup in scripts/audit_candidate.sh, then read tests/conftest.py and tests/test_runtime_audit_report.py. Reproduce the Azure import failure by running the report tests in an interpreter with only pytest installed. Done means the guard tests pass there, the workflow runs in a clean environment in PR CI, and the remaining tag-only commands are reviewed. Linked pull request #625 already targets this, so coordinate with it before starting.

Written by the indexing model from the issue text.

Description

ci needs-triage priority: high size: XS

Context

Publishing v0.17.0 is blocked by the tag-only runtime audit guard step, not by a vulnerability finding. In publish run 41312202572, all four Candidate runtime audit jobs failed: Python 3.11 job 124865052986, 3.12 job 124865053000, 3.13 job 124865053013, and 3.14 job 124865052979.

The Python 3.11 log records:

No known vulnerabilities found
runtime audit clean: 8 dependencies
ImportError while loading conftest '.../tests/conftest.py'.
tests/conftest.py:18: from azure.functions import HttpRequest
ModuleNotFoundError: No module named 'azure'
Process completed with exit code 4.

The minimal reproducer is the workflow's python -m pytest -o addopts= tests/test_runtime_audit_report.py in an interpreter with pytest but without project dependencies. scripts/audit_candidate.sh installs the candidate into a separate temporary venv, leaving the selected interpreter bare. Pytest then automatically loads the shared Azure-dependent conftest, even though the report tests use only pytest, its built-in tmp_path, and the standard-library-only audit report checker. PR CI installs project dependencies and therefore hides this tag-only failure.

Isolate the guard tests from the project conftest and exercise the workflow command in a dependency-less environment in PR CI. Priority is high because publication is blocked; size is XS (focused workflow change, regression tests, local validation and CI). The open backlog is empty and no duplicate audit/conftest defect was found; this release blocker should be addressed first.

Acceptance Checklist

  • Reproduce the old command's Azure conftest import failure on Python 3.11 and 3.12, then verify the corrected command passes on both.
  • The tag audit guard runs all report tests without installing unrelated project dependencies, retaining repository-root imports.
  • PR CI contains a regression that fails for the old workflow command in a clean interpreter.
  • make check-all and make build pass with coverage at least 95%.
  • Review the remaining tag-only commands for the same bare-interpreter defect and document findings.

Out of scope

  • Changing audit logic, advisory policy, release versions, release configuration, or publishing permissions.
  • Retrying or moving v0.17.0, merging this fix, or performing publication. Fix forward on main; never move or reuse a tag for changed code.
  • Refactoring unrelated raw workflow commands or changing downstream repositories.

References

Dominant language
Python
Stars
13
Forks
4
Avg merge
14h 46m
Merged PRs (30d)
89

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.