-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Build: No nx cache in circle ci #33230
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
base: next
Are you sure you want to change the base?
Changes from 1 commit
1c31eaa
29fb093
1a7a568
65355dc
be47220
cbef081
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,11 +37,11 @@ export const compile: Task = { | |
| return false; | ||
| } | ||
| }, | ||
| async run({ codeDir }, { link, dryRun, debug, prod, skipCache }) { | ||
| async run({ codeDir }, { link, dryRun, debug, prod }) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Search for skipCache references across the codebase
rg -n -C3 --type=ts 'skipCache' -g '!scripts/tasks/compile.ts'Repository: storybookjs/storybook Length of output: 5583 🏁 Script executed: #!/bin/bash
# Check the compile task definition and function signature
echo "=== Task option definitions ==="
rg -n -A 30 'compile:' scripts/task.ts | head -60
echo -e "\n=== Compile.ts function signature ==="
sed -n '35,45p' scripts/tasks/compile.tsRepository: storybookjs/storybook Length of output: 515 🏁 Script executed: #!/bin/bash
# Search for compile task option definitions in scripts/task.ts
rg -n 'compile' scripts/task.ts -A 5 -B 5 | head -80
# Also check the actual task.ts structure around task options
echo -e "\n=== Task.ts structure ==="
sed -n '1,50p' scripts/task.tsRepository: storybookjs/storybook Length of output: 3252 🏁 Script executed: #!/bin/bash
# Find task options definition
rg -n 'createOptions' scripts/task.ts -A 100 | head -150
# Also check if there's a per-task options definition
echo -e "\n=== Checking compile task definition ==="
cat scripts/tasks/compile.ts | head -50Repository: storybookjs/storybook Length of output: 6898 🏁 Script executed: #!/bin/bash
# Check check.ts to see if it has the same issue
echo "=== check.ts function signature ==="
rg -n 'async run' scripts/tasks/check.ts -A 3
# Also verify if skipCache is used by any task
echo -e "\n=== Which tasks use skipCache from options ==="
rg -n 'skipCache' scripts/tasks/*.ts | grep -v compile.ts | grep -v check.tsRepository: storybookjs/storybook Length of output: 292 Perfect! I now have enough information to provide a comprehensive rewritten review comment. The verification confirms the parameter removal is safe, but also reveals an additional consistency issue. Verify that the The parameter removal at line 40 is safe—no calling code passes 🤖 Prompt for AI Agents |
||
| const command = link && !prod ? linkCommand : noLinkCommand; | ||
| await rm(join(codeDir, 'bench/esbuild-metafiles'), { recursive: true, force: true }); | ||
| return exec( | ||
| `${command} ${skipCache ? '--skip-nx-cache' : ''}`, | ||
| `${command} --skip-nx-cache`, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# First, let's read the compile.ts file to see the context around line 44
head -60 scripts/tasks/compile.ts | tail -30Repository: storybookjs/storybook Length of output: 927 🏁 Script executed: #!/bin/bash
# List files in scripts/tasks directory
ls -la scripts/tasks/ | head -20Repository: storybookjs/storybook Length of output: 1260 🏁 Script executed: #!/bin/bash
cat -n scripts/tasks/compile.tsRepository: storybookjs/storybook Length of output: 2349 🏁 Script executed: #!/bin/bash
cat -n scripts/tasks/check.tsRepository: storybookjs/storybook Length of output: 1256 🏁 Script executed: #!/bin/bash
# Check git status and see what was modified
git diff HEAD~1 scripts/tasks/compile.ts scripts/tasks/check.ts 2>/dev/null || git diff scripts/tasks/compile.ts scripts/tasks/check.ts 2>/dev/null || echo "Could not get diff"Repository: storybookjs/storybook Length of output: 47 🏁 Script executed: #!/bin/bash
# Check if there's a way to see what branch we're on and what the intent is
git log --oneline -10 2>/dev/null | head -5 || echo "No git log available"
# Also check for environment variables that might indicate CI
env | grep -i "ci\|circle\|github" || echo "No CI env vars found"Repository: storybookjs/storybook Length of output: 108 Based on my verification, I can now provide the rewritten review comment: Apply cache skipping only in CI environments to preserve local development performance. The PR intent is CI-specific per the commit message "No nx cache in circle ci", yet - return exec(
- `${command} --skip-nx-cache`,
- { cwd: ROOT_DIRECTORY },
+ const cacheFlag = process.env.CI ? '--skip-nx-cache' : '';
+ return exec(
+ `${command} ${cacheFlag}`,
+ { cwd: ROOT_DIRECTORY },The same issue exists in
🤖 Prompt for AI Agents
Comment on lines
+40
to
+44
|
||
| { cwd: ROOT_DIRECTORY }, | ||
| { | ||
| startMessage: '🥾 Bootstrapping', | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: storybookjs/storybook
Length of output: 1286
🏁 Script executed:
Repository: storybookjs/storybook
Length of output: 1079
🏁 Script executed:
Repository: storybookjs/storybook
Length of output: 2268
🏁 Script executed:
Repository: storybookjs/storybook
Length of output: 50378
Based on my verification of the codebase, I can now provide the rewritten review comment:
Apply
--skip-nx-cacheonly in CI environments to preserve local performance.The code applies
--skip-nx-cacheunconditionally in bothlinkCommandandnolinkCommand, affecting local development and CI equally. However, the commit message "No nx cache in circle ci" indicates CI-only intent.The codebase already establishes a pattern for environment detection (line 9 uses
process.env.CI). Apply the same pattern here to avoid slowing down local type-checking iterations:🤖 Prompt for AI Agents