HAR: Poetry source name overwrites Python project metadata in build info
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- cli, developer-experience
Research direction
Read pythonProjectFields in modules/har/pkg/har/pkgmgr_buildinfo.go and inspect the existing tests for detectPythonRootPackage or pythonProjectFields. Reproduce with [tool.poetry] metadata followed by [[tool.poetry.source]]; add a regression test showing the project name and version are retained, then confirm the test passes.
Written by the indexing model from the issue text.
Description
Problem
pythonProjectFields reads the last name and version assignments from any section. A later Poetry package-source section can overwrite the project name, producing incorrect RootPackage.Name and dependency parent keys in uploaded build info.
Reproduction
- In
pyproject.toml, set[tool.poetry]toname = "my-app"andversion = "1.2.3". - Add a later
[[tool.poetry.source]]section withname = "private-index"andurl = "https://packages.example.com/simple/". - Pass the file contents to
pythonProjectFields, asdetectPythonRootPackagedoes.
Actual: returns private-index, 1.2.3. Expected: returns my-app, 1.2.3.
Follow-up
Read metadata from the appropriate project section rather than unrelated sections, and add a regression test for a Poetry source declared after project metadata.
Context
Found in PR #288; original review finding. Implementation: pythonProjectFields.
- Dominant language
- Go
- Stars
- 28
- Forks
- 16
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 63
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from harness/cli
-
HAR: Dart trailing YAML comments end up in the parsed versionPossibly taken @BlueLabelscotch claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
beta
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
consensus feature I2 S4 U2
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
[Bug] [Go] Ack returns nil when the server answers with a non-OK statusPossibly taken @leizhiyuan claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
apache/rocketmq-clients#1465 ·
Maintainers usually reply within 2 days
-
Priority/Low Type/Improvement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
OpenNSW/nsw-srilanka#906 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
praetorianer777/Dynamo#57 ·
Maintainers usually reply within 1 day
-
fix(handlers): explicitly set Content-Type header in static Index handlerPossibly taken @kage-zero claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
Maintainers usually reply within 1 day