Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

HAR: Poetry source name overwrites Python project metadata in build info

Đang mở Phù hợp với người mới
#311 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
82/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go, python
Lĩnh vực
cli, developer-experience

Hướng nghiên cứu

Đọc pythonProjectFields trong modules/har/pkg/har/pkgmgr_buildinfo.go và xem các bài kiểm thử hiện có cho detectPythonRootPackage hoặc pythonProjectFields. Tái hiện lỗi bằng metadata [tool.poetry] theo sau là [[tool.poetry.source]]; thêm một bài kiểm thử hồi quy cho thấy tên và phiên bản dự án được giữ lại, sau đó xác nhận bài kiểm thử đạt.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

  1. In pyproject.toml, set [tool.poetry] to name = "my-app" and version = "1.2.3".
  2. Add a later [[tool.poetry.source]] section with name = "private-index" and url = "https://packages.example.com/simple/".
  3. Pass the file contents to pythonProjectFields, as detectPythonRootPackage does.

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.

Ngôn ngữ chính
Go
Star
25
Fork
13
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
72

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của harness/cli

Tất cả issue của harness/cli

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.