Repository navigation
Fix: Declare the Python project type - #294
ModeSevenIndustrialSolutions merged 1 commit into
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new fixture reuses an artefact name uploaded by the existing tests job, causing the second upload to fail because names are workflow-scoped and overwrite is disabled.
1 open issue
What changed in this PR
This PR addresses #293 by making Python artefact-name resolution ignore competing project markers such as package.json and go.mod.
Changes:
- Passes
project_type: 'python'to the metadata action without changing its pin. - Adds a workflow regression test with Python and JavaScript project markers.
- Documents the explicit Python project type.
| File | Description |
|---|---|
README.md |
Explains how Python project naming handles competing marker files. |
action.yaml |
Explicitly selects the Python metadata extractor. |
.github/workflows/testing.yaml |
Adds regression coverage for mixed-project directories. |
Review effort: Balanced
Without artefact_name, the action asks build-metadata-action for the project name but leaves it to detect the project type. That detection ranks package.json, go.mod, pom.xml and others above the Python project files, so a Python project carrying one of them was named after that file and the action looked for the wrong artefact. Pass project_type: python to the naming step, leaving the choice between pyproject.toml, setup.cfg and setup.py to the Python extractor. Add a workflow test that audits a Python project beside a package.json naming another project, and note the behaviour in the README. The test renames its copy of the fixture project before building it. Review found that its artefact shared the name the tests job uploads under, and artefact names are scoped to the workflow run, so one job replaced the other's artefact and the tests job's download failed. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: lf-releng-code-monkey-bot[bot] <332050256+lf-releng-code-monkey-bot[bot]@users.noreply.github.com>
47274bd to
9e7e810
Compare
There was a problem hiding this comment.
🤖 Antagonistic review by agent: no line-level findings; the summary below is the verdict.
The change is narrowly scoped and appears sound: it explicitly selects Python metadata while preserving custom artefact names, and the regression job exercises conflicting project markers without sharing another job's artefact name. No actionable defects found.
Antagonistic round 1 of 3.
Automated antagonistic review by lf-releng-antagonistic-review-bot[bot] using model gpt-6-astra; see the run. This is not a human review and never an approval: a maintainer must still review and approve this pull request.
c898f83
into
lfreleng-actions:main

Closes #293
Authored by an AI agent; human review required
claude-opus-5.5via GitHub Copilot CLI965bc9bf55840ed5f6d92277a02ceec638130a9cgit log --raw --format=%h 965bc9bf55840ed5f6d92277a02ceec638130a9c..HEADuv run --locked python -m pytest tests -quvx zizmor --persona auditor --offline .github/workflows/testing.yaml action.yamlprek run --files .github/workflows/testing.yaml README.md action.yamlThe
github-code-monkey-botworkflow opened this pull request.Nobody has merged it; a maintainer must review it first.
Review findings on this pull request are answered by a later revision round of this workflow, up to ten rounds per antagonistic review round; after that a maintainer, or the next antagonistic review, takes on any finding that remains, and a maintainer reviews every round before merge.
Round 2 of revision, on its base. It set out to fix the failing checks: Test Custom Artefact Name.
What this does
Without
artefact_name, the action asksbuild-metadata-actionfor the project name in itsnamingstep. Until now it left that action to detect the project type itself, and the detection rankspackage.json,go.mod,pom.xmland others above the Python project files. A Python project that also carried one of those files was named after it, and the action looked for the wrong artefact. This change passesproject_type: 'python'to thenamingstep and leaves the choice betweenpyproject.toml,setup.cfgandsetup.pyto the Python extractor. The pin is unchanged.Test Python Project Type, a new job in.github/workflows/testing.yaml, renames its copy oftest-python-projecttolfreleng-test-python-project-typeand builds it under that artefact name. It then writes apackage.jsonnamingnode-sideand runs this action with noartefact_name, so the job fails if the action looks fornode-side. The README documents the behaviour.This round
No code change. The only failing check was
Test Custom Artefact Name, which failed withArtifact not found for name: test-python-project-x64. That job uploads the artefact itself and downloads it a few steps later in the same job. Nothing else in the run uploads, overwrites or deletes that name, and this change doesn't touch the job. In round 1 the same error hitTest No Wheels Guard, another untouched job, and that job passed on the next run. This looks like a transient lookup failure in the artefact service, not a defect in the change. I can't reproduce it without running the workflow, so I made no blind fix.Checks run
prek run --files .github/workflows/testing.yaml README.md action.yaml: passed, aislop includeduv run --locked python -m pytest tests -q: 59 passedzizmor --persona auditorontesting.yamlandaction.yaml: no findingsFor the reviewer
Test Custom Artefact Namefails again on this head, please re-run it. A repeat failure would point to an artefact-service problem in CI.