Page MenuHomePhabricator

[builds-api] Main branch is used even when a different "ref" is specified
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

[step-clone] 2025-05-16T14:26:45.984027419Z + /ko-app/git-init '-url=https://github.com/dhinus/wikidata-painters' '-revision=bec591393bd9656e37184e3afd2086f01148650e' '-refspec=' '-path=/workspace/' '-sslVerify=true' '-submodules=true' '-depth=1' '-sparseCheckoutDirectories='

What should have happened instead?:

The tip of the branch buildservice should be used.

Other information

Looking at the resolveRef function, it seems that the value of ref is never used: https://gitlab.wikimedia.org/repos/cloud/toolforge/builds-api/-/blob/main/internal/build.go#L784

Details

Related Changes in GitLab:
TitleReferenceAuthorSource BranchDest Branch
builds-api: bump to 0.0.192-20250516182559-51f1f993repos/cloud/toolforge/toolforge-deploy!788group_203_bot_f4d95069bb2675e4ce1fff090c1c1620bump_builds-apimain
DONOTMERGE Use the given ref as the 4th argument for pattern matching in git ls-remoterepos/cloud/toolforge/builds-api!133dcarodcaro-patch-1main
Use the given ref as a pattern in git ls-remoterepos/cloud/toolforge/builds-api!132nokibsarkarpatch-1main
Customize query in GitLab

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

nokibsarkar updated https://gitlab.wikimedia.org/repos/cloud/toolforge/builds-api/-/merge_requests/132

[builds-api] Main branch is used even when a different "ref" is specified.

Nokib_Sarkar changed the task status from Open to In Progress.May 16 2025, 4:32 PM

dcaro closed https://gitlab.wikimedia.org/repos/cloud/toolforge/builds-api/-/merge_requests/133

DONOTMERGE Use the given ref as the 4th argument for pattern matching in git ls-remote

group_203_bot_f4d95069bb2675e4ce1fff090c1c1620 opened https://gitlab.wikimedia.org/repos/cloud/toolforge/toolforge-deploy/-/merge_requests/788

builds-api: bump to 0.0.192-20250516182559-51f1f993