-
Notifications
You must be signed in to change notification settings - Fork 9
Tweak Nx caching settings #98
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: main
Are you sure you want to change the base?
Conversation
…vements - Enabled caching for several project targets across multiple packages - Added outputs and cache options to improve build performance - Adjusted dependencies and build targets for consistency - Updated test and dev commands to optimize workflows - Removed redundant or disabled cache settings where appropriate
…fix ignore path in edge-worker - Changed output paths to use {workspaceRoot} prefix across multiple packages - Corrected ignore path in edge-worker to point to dist directory instead of src - Updated build output targets for example-flows and website to match new output structure
|
Warning Rate limit exceeded@jumski has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 52 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughThis update introduces explicit caching controls and output path specifications across multiple project configuration files. Targets for building, testing, and serving now declare cache settings and, where applicable, output directories. Some legacy publish targets are removed. These changes standardize and clarify the build system's behavior regarding cache usage and artifact locations. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant NxExecutor
participant CacheSystem
participant FileSystem
Developer->>NxExecutor: Run target (e.g., build, test)
NxExecutor->>CacheSystem: Check cache (if cache: true)
alt Cache enabled and hit
CacheSystem-->>NxExecutor: Return cached outputs
else Cache enabled and miss or cache: false
NxExecutor->>FileSystem: Execute target steps
FileSystem-->>NxExecutor: Produce outputs
alt Cache enabled
NxExecutor->>CacheSystem: Store outputs in cache
end
end
NxExecutor-->>Developer: Return results
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for pgflow-demo canceled.
|
View your CI Pipeline Execution ↗ for commit 7a9054e.
☁️ Nx Cloud last updated this comment at |
- Add explicit step names for checkout, setup-node, and other actions for clarity - Specify fetch-depth: 0 for full history in checkout steps - Update pnpm version to 8.14.1 in setup actions - Add step names for installing Deno and Atlas tools - Enhance readability and maintainability of CI and release workflows
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
examples/playground/project.json (1)
9-10
: Optional: Define outputs for build target
If thebuild
target will eventually produce artifacts, consider adding an"outputs"
array (e.g."outputs": ["dist/examples/playground"]
) so that caching can be re-enabled with a real executor in the future.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
examples/playground/project.json
(1 hunks)pkgs/cli/project.json
(3 hunks)pkgs/core/project.json
(7 hunks)pkgs/dsl/project.json
(1 hunks)pkgs/edge-worker/project.json
(6 hunks)pkgs/example-flows/project.json
(1 hunks)pkgs/website/project.json
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Cloudflare Pages
🔇 Additional comments (33)
examples/playground/project.json (1)
9-10
: Cache setting explicitly disabled for 'build'
This aligns with the broader pattern of controlling cache behavior per target and ensures that this noop executor won’t be cached.pkgs/edge-worker/project.json (14)
9-10
: Explicitly disable caching on noop build target
ClearingdependsOn
and setting"cache": false
for thebuild
executor (noop) ensures every run is fresh and not pulled from cache.
30-31
: Enable caching for Deno-based tests
Adding"cache": true
to thetest:nx-deno
target with definedoutputs
allows Nx to reuse results and speed up repeated test runs.
37-39
: Update lint ignore path and enable caching
Changing the ignore path topkgs/edge-worker/dist/
skips generated artifacts, and enabling caching speeds up lint checks on unchanged code.
47-48
: Disable caching for supabase:start
Side-effectful commands likesupabase start
must run every time; disabling cache is correct.
56-57
: Disable caching for supabase:stop
Disabling cache ensures the stop command always executes to clean up state.
65-66
: Disable caching for supabase:status
The status output may vary over time, so caching it could mask state changes.
74-75
: Disable caching for supabase:restart
Combining stop/start commands should always execute fresh; disabling cache is appropriate.
90-91
: Disable caching for supabase:reset
Database reset operations must always run; caching would skip critical migration steps.
102-103
: Disable caching for supabase:functions-serve
Serving pipeline functions should reflect the latest code on every run.
112-113
: Disable caching for db:ensure
Ensuring database schema is an environment-specific task; disabling cache prevents stale states.
118-122
: Add explicit inputs/outputs and enable caching for unit tests
Specifyinginputs
andoutputs
for thetest:unit
target ensures proper cache invalidation and reuse for subsequent runs.Also applies to: 129-131
134-134
: Add dependencies, inputs/outputs and enable caching for integration tests
DefiningdependsOn
, explicit file globs ininputs
, andoutputs
allows Nx to enforce ordering and cache integration test results.Also applies to: 136-140, 147-149
159-160
: Disable caching for E2E tests
E2E tests interact with external state; disabling cache ensures they always run against a fresh environment.
163-164
: Enable caching for aggregate test target
Enabling cache on the top-leveltest
target (which aggregates unit and integration) will speed up composite pipelines when inputs haven’t changed.pkgs/example-flows/project.json (2)
11-11
: Explicitly define build outputs
Good addition: specifying"outputs": ["{workspaceRoot}/pkgs/example-flows/dist"]
ensures Nx can track the directory of generated artifacts for this library.
18-19
: Enable caching for build target
Adding"cache": true
here aligns with other packages and will accelerate incremental builds.pkgs/dsl/project.json (2)
17-19
: Standardize build outputs and enable caching
Specifying"outputs": ["{workspaceRoot}/pkgs/dsl/dist"]
alongside"cache": true
brings consistency with other packages and speeds up rebuilds.
27-28
: Cache test results
Enabling"cache": true
for thetest
target will cache test outputs under coverage, reducing redundant work on unchanged tests.pkgs/website/project.json (3)
10-16
: Standardize build outputs and enable caching
Defining explicit"outputs": ["{workspaceRoot}/pkgs/website/dist"]
, matching theoutputPath
, and setting"cache": true
ensures consistent artifact tracking and faster builds.
23-24
: Disable caching for dev server
"cache": false
on thedev
target is appropriate for a long-running development process, ensuring changes are always picked up.
31-32
: Disable caching for preview command
Disabling cache onpreview
prevents stale builds when previewing local artifacts.pkgs/cli/project.json (5)
23-25
: Standardize build outputs and enable caching
Adding"outputs": ["{workspaceRoot}/pkgs/cli/dist"]
and"cache": true
aligns the CLI package with other libraries and improves incremental build performance.
32-33
: Disable caching for serve target
Disabling cache ("cache": false
) on theserve
command is correct for a continuously running process that should always reflect the latest code.
37-38
: Cache noop test aggregator
Marking thetest
noop target as cacheable avoids redundant invocations of the grouped E2E commands.
52-53
: Cache E2E install step
Enabling"cache": true
ontest:e2e:install
can significantly speed up CI builds if the Supabase setup is deterministic. Please verify that caching side-effects here won't skip necessary initialization.
67-68
: Cache E2E compile step
Similarly, cachingtest:e2e:compile
will improve CI performance. Ensure generated artifacts are invalidated correctly on source changes.pkgs/core/project.json (6)
76-79
: Enable caching and outputs for build
Adding"outputs": ["{workspaceRoot}/pkgs/core/dist"]
and setting"cache": true
ensures compiled artifacts are tracked and speeds up incremental builds.
89-91
: Enable caching for lint targets
Marking bothlint:sqruff
and the compositelint
target as cacheable avoids redundant lint executions on unchanged schemas.Also applies to: 94-95
106-108
: Disable caching for SQL fixes
Thefix-sql
target intentionally disables caching ("cache": false
), forcing fresh lint/fix runs each time.
117-119
: Disable caching for Supabase lifecycle commands
Disabling cache on allsupabase:*
targets prevents stale database state, ensuring each command runs afresh as required.Also applies to: 126-128, 135-137, 144-146, 153-155, 163-164
168-170
: Enable caching for test workflows
Caching the test suite aggregators (test
,test:pgtap
,test:vitest
) speeds up CI by skipping runs when inputs haven’t changed.Also applies to: 178-180, 188-190
215-216
: Cache generated types tasks
Enabling cache forgen-types
andverify-gen-types
ensures type generation and verification steps are skipped when inputs haven’t changed, improving iteration speed.Also applies to: 234-235
Deploying pgflow with
|
Latest commit: |
7a9054e
|
Status: | ✅ Deploy successful! |
Preview URL: | https://bf5c2aa2.pgflow.pages.dev |
Branch Preview URL: | https://update-nx-caching-settings.pgflow.pages.dev |
…urations - Updated project.json files in core and edge-worker packages to set cache to false - Ensures that all test, lint, verify, and build commands do not use caching - Improves consistency and reliability of test and build processes by avoiding cached results
…n, and enhance project cache settings - Enabled Nx Cloud task distribution and removed deprecated start-ci-run command - Refined cache settings for core and edge-worker projects to ensure proper caching - Updated CI steps for database-dependent tests to depend on cacheable jobs - Improved overall CI configuration for better performance and cache management
…uild steps Refactors CI workflow to skip non-cacheable targets, run only necessary affected targets, and introduce dedicated steps for database-dependent builds and tests.
Summary by CodeRabbit