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:
- The PR's CI run failed but only after uploading artifacts.
- 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.
Current Behavior
Build artifacts for nextstrain/cli#333 aren't downloadable via the
/cli/download/pr-buildendpoint, but are via the/cli/download/ci-buildendpoint. This is because:/cli/download/ci-buildendpoint simply downloads the build artifacts if they are available, without checking if the run was successful. The/cli/download/pr-buildendpoint checks that the run is successful:nextstrain.org/src/endpoints/cli.js
Lines 54 to 61 in bd9846a
Expected behavior
The
/cli/download/pr-buildendpoint 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.