Skip to content

Commit

Permalink
[ci] getWorkflowRun should not throw early if workflow hasn't complet…
Browse files Browse the repository at this point in the history
…ed (facebook#31861)

We already have handling and retry logic for in-flight workflows in
`downloadArtifactsFromGitHub`, so there's no need to exit early if we
find a workflow for a given commit but it hasn't finished yet.
  • Loading branch information
poteto authored Dec 19, 2024
1 parent 9f540fc commit c70ab3f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions scripts/release/shared-commands/download-build-artifacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,7 @@ async function getWorkflowRun(commit) {
);

const json = JSON.parse(res.stdout);
const workflowRun = json.workflow_runs.find(
run =>
run.head_sha === commit &&
run.status === 'completed' &&
run.conclusion === 'success'
);
const workflowRun = json.workflow_runs.find(run => run.head_sha === commit);

if (workflowRun == null || workflowRun.id == null) {
console.log(
Expand Down

0 comments on commit c70ab3f

Please sign in to comment.