Skip to content

CLI installer doesn't work for failed PR builds that still have artifacts #759

Description

@victorlin

Current Behavior

Build artifacts for nextstrain/cli#333 aren't downloadable via the /cli/download/pr-build endpoint, but are via the /cli/download/ci-build endpoint. This is because:

  1. The PR's CI run failed but only after uploading artifacts.
  2. The /cli/download/ci-build endpoint simply downloads the build artifacts if they are available, without checking if the run was successful. The /cli/download/pr-build endpoint checks that the run is successful:
    // Last 100 successful CI runs matching the PR's head branch name. This may
    // apply to multiple PR ids, so we limit by PR head repo too after the fetch.
    const params = new URLSearchParams({
    event: "pull_request",
    branch: prRef,
    status: "success",
    page_size: 100,
    });

Expected behavior

The /cli/download/pr-build endpoint should allow downloads as long as the artifact is available, even if the run was not successful.

Possible solution

Change or remove the status: "success" search param.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions