Skip to content

Commit

Permalink
Redirect example services stdout and stderr to a file (#534)
Browse files Browse the repository at this point in the history
Co-authored-by: theguild-bot <[email protected]>
  • Loading branch information
enisdenjo and theguild-bot authored Jan 24, 2025
1 parent 7ac27d9 commit 802aae7
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion examples/apq-subgraphs/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"name": "Start service greetings",
"command": "nohup npm run service:greetings $> service-greetings.out &"
"command": "nohup npm run service:greetings &> service-greetings.out &"
},
{
"name": "Wait for service greetings",
Expand Down
4 changes: 2 additions & 2 deletions examples/extra-fields/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
},
{
"name": "Start service foo",
"command": "nohup npm run service:foo $> service-foo.out &"
"command": "nohup npm run service:foo &> service-foo.out &"
},
{
"name": "Wait for service foo",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 http://0.0.0.0:4001"
},
{
"name": "Start service bar",
"command": "nohup npm run service:bar $> service-bar.out &"
"command": "nohup npm run service:bar &> service-bar.out &"
},
{
"name": "Wait for service bar",
Expand Down
8 changes: 4 additions & 4 deletions examples/federation-example/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
},
{
"name": "Start service accounts",
"command": "nohup npm run service:accounts $> service-accounts.out &"
"command": "nohup npm run service:accounts &> service-accounts.out &"
},
{
"name": "Wait for service accounts",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 http://0.0.0.0:4001"
},
{
"name": "Start service inventory",
"command": "nohup npm run service:inventory $> service-inventory.out &"
"command": "nohup npm run service:inventory &> service-inventory.out &"
},
{
"name": "Wait for service inventory",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 http://0.0.0.0:4002"
},
{
"name": "Start service products",
"command": "nohup npm run service:products $> service-products.out &"
"command": "nohup npm run service:products &> service-products.out &"
},
{
"name": "Wait for service products",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 http://0.0.0.0:4003"
},
{
"name": "Start service reviews",
"command": "nohup npm run service:reviews $> service-reviews.out &"
"command": "nohup npm run service:reviews &> service-reviews.out &"
},
{
"name": "Wait for service reviews",
Expand Down
8 changes: 4 additions & 4 deletions examples/federation-mixed/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@
},
{
"name": "Start service accounts",
"command": "nohup npm run service:accounts $> service-accounts.out &"
"command": "nohup npm run service:accounts &> service-accounts.out &"
},
{
"name": "Wait for service accounts",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 http://0.0.0.0:4001"
},
{
"name": "Start service inventory",
"command": "nohup npm run service:inventory $> service-inventory.out &"
"command": "nohup npm run service:inventory &> service-inventory.out &"
},
{
"name": "Wait for service inventory",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 http://0.0.0.0:4002"
},
{
"name": "Start service products",
"command": "nohup npm run service:products $> service-products.out &"
"command": "nohup npm run service:products &> service-products.out &"
},
{
"name": "Wait for service products",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 http://0.0.0.0:4003"
},
{
"name": "Start service reviews",
"command": "nohup npm run service:reviews $> service-reviews.out &"
"command": "nohup npm run service:reviews &> service-reviews.out &"
},
{
"name": "Wait for service reviews",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
},
{
"name": "Start service products",
"command": "nohup npm run service:products $> service-products.out &"
"command": "nohup npm run service:products &> service-products.out &"
},
{
"name": "Wait for service products",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 http://0.0.0.0:4001"
},
{
"name": "Start service reviews",
"command": "nohup npm run service:reviews $> service-reviews.out &"
"command": "nohup npm run service:reviews &> service-reviews.out &"
},
{
"name": "Wait for service reviews",
Expand Down
2 changes: 1 addition & 1 deletion examples/file-upload/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"name": "Start service bucket",
"command": "nohup npm run service:bucket $> service-bucket.out &"
"command": "nohup npm run service:bucket &> service-bucket.out &"
},
{
"name": "Wait for service bucket",
Expand Down
4 changes: 2 additions & 2 deletions examples/hmac-auth-https/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
},
{
"name": "Start service users",
"command": "nohup npm run service:users $> service-users.out &"
"command": "nohup npm run service:users &> service-users.out &"
},
{
"name": "Wait for service users",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 -k https://0.0.0.0:4001"
},
{
"name": "Start service comments",
"command": "nohup npm run service:comments $> service-comments.out &"
"command": "nohup npm run service:comments &> service-comments.out &"
},
{
"name": "Wait for service comments",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"name": "Start service Test",
"command": "nohup npm run service:Test $> service-Test.out &"
"command": "nohup npm run service:Test &> service-Test.out &"
},
{
"name": "Wait for service Test",
Expand Down
2 changes: 1 addition & 1 deletion examples/json-schema-subscriptions/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"name": "Start service api",
"command": "nohup npm run service:api $> service-api.out &"
"command": "nohup npm run service:api &> service-api.out &"
},
{
"name": "Wait for service api",
Expand Down
2 changes: 1 addition & 1 deletion examples/openapi-arg-rename/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"name": "Start service Wiki",
"command": "nohup npm run service:Wiki $> service-Wiki.out &"
"command": "nohup npm run service:Wiki &> service-Wiki.out &"
},
{
"name": "Wait for service Wiki",
Expand Down
2 changes: 1 addition & 1 deletion examples/openapi-subscriptions/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"name": "Start service api",
"command": "nohup npm run service:api $> service-api.out &"
"command": "nohup npm run service:api &> service-api.out &"
},
{
"name": "Wait for service api",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"name": "Start service users",
"command": "nohup npm run service:users $> service-users.out &"
"command": "nohup npm run service:users &> service-users.out &"
},
{
"name": "Wait for service users",
Expand Down
2 changes: 1 addition & 1 deletion examples/programmatic-batching/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"name": "Start service api",
"command": "nohup npm run service:api $> service-api.out &"
"command": "nohup npm run service:api &> service-api.out &"
},
{
"name": "Wait for service api",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
{
"name": "Start service my-subgraph",
"command": "nohup npm run service:my-subgraph $> service-my-subgraph.out &"
"command": "nohup npm run service:my-subgraph &> service-my-subgraph.out &"
},
{
"name": "Wait for service my-subgraph",
Expand Down
4 changes: 2 additions & 2 deletions examples/type-merging-batching/.codesandbox/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
},
{
"name": "Start service authors",
"command": "nohup npm run service:authors $> service-authors.out &"
"command": "nohup npm run service:authors &> service-authors.out &"
},
{
"name": "Wait for service authors",
"command": "curl --retry-connrefused --retry 10 --retry-delay 3 http://0.0.0.0:4001"
},
{
"name": "Start service books",
"command": "nohup npm run service:books $> service-books.out &"
"command": "nohup npm run service:books &> service-books.out &"
},
{
"name": "Wait for service books",
Expand Down
4 changes: 2 additions & 2 deletions internal/examples/src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ export async function convertE2EToExample(config: ConvertE2EToExampleConfig) {

tasks.push({
name: `Start service ${service}`,
// command: `nohup npm run service:${service} $> service-${service}.out &`,
// command: `nohup npm run service:${service} &> service-${service}.out &`,
command: `npm run service:${service}`,
background: {
service,
Expand Down Expand Up @@ -492,7 +492,7 @@ export async function convertE2EToExample(config: ConvertE2EToExampleConfig) {
? [
{
name: task.name,
command: `nohup ${task.command} $> service-${background.service}.out &`,
command: `nohup ${task.command} &> service-${background.service}.out &`,
},
background.wait,
]
Expand Down

0 comments on commit 802aae7

Please sign in to comment.