[Bug]: pipeline view/job list/artifacts list still lowercase mixed-case org slugs (normalizeSlug), unlike PR #686
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 74/100
Hướng nghiên cứu
Bắt đầu trong internal/pipeline/resolver/cli.go tại normalizeSlug và parsePipelineArg, sau đó kiểm tra WithOrg trong internal/pipeline/resolver/resolver.go cùng các caller của chúng. Tái hiện các ví dụ AcmeCorp có kiểu chữ hoa-thường xen kẽ, giữ nguyên organization slugs đồng thời duy trì hành vi chuyển underscore thành hyphen như dự kiến, và xác minh rằng các lệnh pipeline, job, artifact, build-create và preflight bị ảnh hưởng không còn yêu cầu organization được chuyển thành chữ thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Contact Details
No response
What happened?
bk pipeline view, bk job list --pipeline, and bk artifacts list --pipeline all fail with
404 No organization found when the org slug is mixed case (e.g. AcmeCorp), because the org
value is silently lowercased before the API request.
$ bk pipeline view AcmeCorp/my-pipeline
Error: GET https://api.buildkite.com/v2/organizations/acmecorp/pipelines/my-pipeline: 404 No organization found
$ bk job list --pipeline AcmeCorp/my-pipeline --build 1234
Error: failed to list jobs: GET https://api.buildkite.com/v2/organizations/acmecorp/pipelines/my-pipeline/builds/1234/jobs?...: 404 No organization found
$ bk artifacts list 1234 --pipeline AcmeCorp/my-pipeline
Error: GET https://api.buildkite.com/v2/organizations/acmecorp/pipelines/my-pipeline/builds/1234/artifacts?per_page=100: 404 No organization found
bk build view AcmeCorp/my-pipeline/1234 and bk build list --pipeline AcmeCorp/my-pipeline work correctly — they don't go through the same resolver path.
Diagnosis
This looks like a resurgence of #424 / #685, which #686 only partially fixed. #686 fixed the
validation regex that rejected mixed-case slugs, but didn't touch the separate
normalizeSlug helper that actually lowercases the value:
// internal/pipeline/resolver/cli.go
func normalizeSlug(s string) string {
return strings.ToLower(strings.ReplaceAll(s, "_", "-"))
}
normalizeSlug is called from parsePipelineArg (used by both ResolveFromFlag and
ResolveFromPositionalArgument) and from WithOrg in internal/pipeline/resolver/resolver.go,
so any org parsed from a positional org/pipeline arg, --pipeline org/slug, or --org is
lowercased regardless of the actual casing on Buildkite.
Commands going through this resolver chain are affected:
pipeline view,pipeline copyjob list --pipelineartifacts list --pipelinebuild create,preflight
build view / build list --pipeline don't hit normalizeSlug and work fine.
Expected behavior
Org slugs should be preserved as given by the user (or resolved from git/config) and not
forced to lowercase, matching the fix intent of #686. normalizeSlug's underscore→hyphen
substitution is presumably still wanted for local repo-derived names, but the ToLower call
should not apply to org (and probably not pipeline) slugs.
Version
3.56.0
What environment are you seeing the problem on?
Local Development
Relevant log output
$ bk --debug pipeline view AcmeCorp/my-pipeline 2>&1 | head -5
DEBUG request uri=https://api.buildkite.com/v2/organizations/acmecorp/pipelines/my-pipeline
GET /v2/organizations/acmecorp/pipelines/my-pipeline HTTP/1.1
...
HTTP/2.0 404 Not Found
- Ngôn ngữ chính
- Go
- Star
- 207
- Fork
- 70
- Merge trung bình
- 3 giờ 48 phút
- Pull request đã merge (30 ngày)
- 32
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của buildkite/cli
-
Dependency DashboardĐang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
buildkite/cli#965 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
buildkite/cli#964 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
buildkite/cli#963 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của buildkite/cli
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
shukiv/jabali-panel#2029 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[submenu] nil issue on ubuntu 26.04Có thể đã có người làm @egoist đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
prime-radiant-inc/evener#3873 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
v2fly/domain-list-community#4127 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
extract_llm_sweep / cache_aware_summarizer prefix ask 400s when thinking.budget_tokens exceeds PrefixAskMaxTokensCó thể đã có người làm @amiddavid đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
rossoctl/context-guru#405 ·
Maintainer thường phản hồi trong vòng 1 ngày