Skip to content

Commit 375a202

Browse files
refactor: reduce complexity of execute_impl in upload_pipeline_artifact.rs (#1625)
Extract six focused helpers from the 383-line execute_impl: - resolve_effective_build_id: resolve build ID from request or BUILD_BUILDID - resolve_final_artifact_name: all allowlist/name-prefix/extension checks - resolve_staged_file: canonicalize, bounds-check, size/dir checks - resolve_ado_context: extract org_url/project/project_id/token/container_id - upload_file_to_container: Step 1 HTTP PUT to the build container - associate_artifact_with_build: Step 2 HTTP POST to associate artifact record The remaining execute_impl is now 85 lines with a clear sequential narrative: resolve IDs → validate names → validate staged file → dry-run → verify hash → resolve context → dedupe check → upload → associate → record dedupe key. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 4a26509 commit 375a202

1 file changed

Lines changed: 400 additions & 305 deletions

File tree

0 commit comments

Comments
 (0)