Skip to content

Commit

Permalink
Merge pull request #25541 from storybookjs/valentin/fix-wait-on-locally
Browse files Browse the repository at this point in the history
Sandboxes: Update wait-on command to use TCP instead of HTTP
  • Loading branch information
valentinpalkovic authored Jan 16, 2024
2 parents 7c85f42 + 5d5a897 commit e95e2b9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate-sandboxes-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: yarn local-registry --open &
working-directory: ./code
- name: Wait for registry
run: yarn wait-on http://localhost:6001
run: yarn wait-on tcp:127.0.0.1:6001
working-directory: ./code
- name: Generate
run: yarn generate-sandboxes --local-registry
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate-sandboxes-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: yarn local-registry --open &
working-directory: ./code
- name: Wait for registry
run: yarn wait-on http://localhost:6001
run: yarn wait-on tcp:127.0.0.1:6001
working-directory: ./code
- name: Generate
run: yarn generate-sandboxes --local-registry --debug
Expand Down
2 changes: 1 addition & 1 deletion scripts/tasks/run-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export async function runRegistry({ dryRun, debug }: { dryRun?: boolean; debug?:
// If aborted, we want to make sure the rejection is handled.
if (!err.killed) throw err;
});
await exec('yarn wait-on http://localhost:6001', { cwd: CODE_DIRECTORY }, { dryRun, debug });
await exec('yarn wait-on tcp:127.0.0.1:6001', { cwd: CODE_DIRECTORY }, { dryRun, debug });

return controller;
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/tasks/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const serve: Task = {
throw err;
}
});
await waitOn({ resources: [`http://localhost:${PORT}`], interval: 16 });
await waitOn({ resources: [`tcp:127.0.0.1:${PORT}`], interval: 16 });

return controller;
},
Expand Down

0 comments on commit e95e2b9

Please sign in to comment.