Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[turborepo] broken input globs cause turbo to hang #6016

Closed
NullVoxPopuli opened this issue Sep 24, 2023 · 6 comments · Fixed by #6060
Closed

[turborepo] broken input globs cause turbo to hang #6016

NullVoxPopuli opened this issue Sep 24, 2023 · 6 comments · Fixed by #6060
Labels
kind: bug Something isn't working

Comments

@NullVoxPopuli
Copy link

NullVoxPopuli commented Sep 24, 2023

What version of Turborepo are you using?

1.10.14

What package manager are you using / does the bug impact?

pnpm

What operating system are you using?

Linux / Ubuntu, 23.04

Describe the Bug

turbo makes no progress and stops here when running with --verbosity 3

❯ pnpm turbo run test:lint --verbosity 3
2023-09-24T19:21:27.061-0400 [DEBUG] turborepo_lib::shim: Global turbo version: 1.10.14
2023-09-24T19:21:27.069-0400 [DEBUG] turborepo_lib::shim: No local turbo binary found at: /home/nullvoxpopuli/Development/OpenSource/starbeam/starbeam/node_modules/turbo-linux-64/bin/turbo
2023-09-24T19:21:27.069-0400 [DEBUG] turborepo_lib::shim: No local turbo binary found at: /home/nullvoxpopuli/Development/OpenSource/starbeam/starbeam/node_modules/turbo/node_modules/turbo-linux-64/bin/turbo
2023-09-24T19:21:27.069-0400 [DEBUG] turborepo_lib::shim: Local turbo path: /home/nullvoxpopuli/Development/OpenSource/starbeam/starbeam/node_modules/.pnpm/[email protected]/node_modules/turbo-linux-64/bin/turbo
2023-09-24T19:21:27.069-0400 [DEBUG] turborepo_lib::shim: Local turbo version: 1.10.14
2023-09-24T19:21:27.069-0400 [DEBUG] turborepo_lib::shim: Repository Root: /home/nullvoxpopuli/Development/OpenSource/starbeam/starbeam
2023-09-24T19:21:27.070-0400 [DEBUG] turborepo_lib::shim: Running local turbo binary in /home/nullvoxpopuli/Development/OpenSource/starbeam/starbeam/node_modules/.pnpm/[email protected]/node_modules/turbo-linux-64/bin/turbo

2023-09-24T19:21:27.070-0400 [DEBUG] turborepo_lib::shim: supports_skip_infer_and_single_package true
2023-09-24T19:21:27.070-0400 [DEBUG] turborepo_lib::shim: Global turbo version: 1.10.14
2023-09-24T19:21:27.070-0400 [TRACE] log: registering event source with poller: token=Token(1), interests=READABLE
2023-09-24T19:21:27.071-0400 [DEBUG] turborepo_lib::cli: pkg_inference_root set to ""
2023-09-24T19:21:27.072-0400 [TRACE] turborepo_lib::execution_state: Found pnpm as package manager
2023-09-24T19:21:27.072-0400 [DEBUG] turbo: Found go binary at "/home/nullvoxpopuli/Development/OpenSource/starbeam/starbeam/node_modules/.pnpm/[email protected]/node_modules/turbo-linux-64/bin/go-turbo"
2023-09-24T19:21:27.072-0400 [TRACE] turbo: Invoking go binary with {"api_client_config":{"token":null,"team_id":null,"team_slug":null,"api_url":"https://vercel.com/api","use_preflight":false,"timeout":20},"spaces_api_client_config":{"token":null,"team_id":null,"team_slug":null,"api_url":"https://vercel.com/api","use_preflight":false,"timeout":20},"package_manager":"pnpm","cli_args":{"api":null,"color":false,"cpu_profile":null,"cwd":"/home/nullvoxpopuli/Development/OpenSource/starbeam/starbeam","heap":null,"login":null,"no_color":false,"preflight":false,"remote_cache_timeout":null,"team":null,"token":null,"trace":null,"verbosity":3,"test_run":false,"command":{"Run":{"cache_dir":null,"cache_workers":10,"concurrency":null,"continue_execution":false,"dry_run":null,"single_package":false,"filter":[],"force":null,"framework_inference":true,"global_deps":[],"graph":null,"env_mode":"Infer","ignore":[],"include_dependencies":false,"no_cache":false,"no_daemon":false,"no_deps":false,"output_logs":null,"log_order":"auto","only":false,"parallel":false,"pkg_inference_root":"","profile":null,"remote_only":false,"scope":[],"since":null,"summarize":null,"log_prefix":"auto","tasks":["test:lint"],"pass_through_args":[],"experimental_space_id":null,"experimental_rust_codepath":false}}}}
2023-09-24T19:21:27.075-0400 [DEBUG] turbo: build tag: rust
2023-09-24T19:21:27.137-0400 [DEBUG] turbo: running in daemon mode
2023-09-24T19:21:27.138-0400 [DEBUG] turbo: global hash env vars: vars=[]
2023-09-24T19:21:27.142-0400 [DEBUG] turbo: global hash: value=d663a0d8a5b987b2
2023-09-24T19:21:27.142-0400 [DEBUG] turbo: local cache folder: path=""

Expected Behavior

command proceeds

To Reproduce

Use this turbo.json:

{
  "$schema": "https://turbo.build/schema.json",
  // Additive to package.json and turbo.json
  //
  // https://turbo.build/repo/docs/core-concepts/caching/file-inputs#specifying-additional-inputs
  "globalDependencies": [
    ".github/workflows/ci.yml",
    ".npmrc",
    ".eslintrc.json",
    ".eslintrc.repo.json",
    "pnpm-lock.yaml",
    "pnpm-workspace.yaml",
    "patches",
    "vitest.config.ts",
    "vitest.workspace.ts",
    "tsconfig.json",
    "tsconfig.root.json"
  ],
  "pipeline": {
    "lint": {
      "dependsOn": ["test:lint"],
      "outputs": []
    },
    "test:lint": {
      "outputs": [],
      // We manually manage inputs
      // because we have nested workspaces.
      // We want to omit the tests workspace
      // for example.
      "inputs": ["src/**", "*.{ts,js,mjs,json,mts,cjs,cts"]
    },
    "test:types": {
      "outputs": [],
      // We manually manage inputs
      // because we have nested workspaces.
      // We want to omit the tests workspace
      // for example.
      "inputs": ["src/**", "*.{ts,js,mjs,json,mts,cjs,cts"]
    },
    "typecheck": {
      "dependsOn": ["test:types"],
      "outputs": []
    }
  }
}

Reproduction Repo

starbeamjs/starbeam#132

The command I ran:

pnpm turbo run test:lint --verbosity 3

dry-run hangs, too:

pnpm turbo run test:types --dry-run=json \
| jq 'reduce .tasks[] as {$package,$task,$inputs} ({};
      .[$package][$task] |= $inputs
     )' \
| jq '."@starbeam/vue"'
@NullVoxPopuli NullVoxPopuli added kind: bug Something isn't working needs: triage New issues get this label. Remove it after triage owned-by: turborepo labels Sep 24, 2023
@nathanhammond
Copy link
Contributor

nathanhammond commented Sep 25, 2023

We're aware of a globbing issue on Linux. I suspect that pinning to one of 1.10.3 or 1.9.5 will work around this issue. Probably the same as #5773 and #5908.

@nathanhammond nathanhammond removed the needs: triage New issues get this label. Remove it after triage label Sep 25, 2023
NullVoxPopuli added a commit to starbeamjs/starbeam that referenced this issue Sep 25, 2023
NullVoxPopuli added a commit to starbeamjs/starbeam that referenced this issue Sep 25, 2023
NullVoxPopuli added a commit to starbeamjs/starbeam that referenced this issue Sep 25, 2023
@gsoltis
Copy link
Contributor

gsoltis commented Sep 28, 2023

@NullVoxPopuli I think you have a bad glob: here and here you are missing a closing }.

However. turbo should definitely not just hang in that situation. Looking into what's going on there.

@NullVoxPopuli
Copy link
Author

oh no! how embarrassing for me 😅

thanks for looking in to it.
it'd be great if the we had line/column-aware errors for stuff like this 💪

@nathanhammond
Copy link
Contributor

@NullVoxPopuli Coming soon: biome-json-parser to parse JSON with spans because serde_json can't do it.

@nathanhammond
Copy link
Contributor

Closing this issue out as resolved and we'll trace perf issues in the other two reports.

@nathanhammond
Copy link
Contributor

Actually, no, I'm going to repurpose this issue. Broken globs shouldn't break us.

@nathanhammond nathanhammond changed the title [turborepo] hangs after adding inputs with workspace-root globs [turborepo] broken input globs cause turbo to hang Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants