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

chore(repo): enable db cache #27843

Merged
merged 1 commit into from
Sep 10, 2024
Merged

chore(repo): enable db cache #27843

merged 1 commit into from
Sep 10, 2024

Conversation

FrozenPandaz
Copy link
Collaborator

Current Behavior

The new db cache is not being used.

Expected Behavior

The new sqlite db cache is being used.

Related Issue(s)

Fixes #

Copy link

vercel bot commented Sep 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Sep 9, 2024 9:57pm

@FrozenPandaz FrozenPandaz enabled auto-merge (squash) September 9, 2024 21:55
@FrozenPandaz FrozenPandaz merged commit 72432d6 into master Sep 10, 2024
6 checks passed
@FrozenPandaz FrozenPandaz deleted the test-db-cache branch September 10, 2024 05:58
@eliellis
Copy link

eliellis commented Sep 11, 2024

Hi @FrozenPandaz, watching this work here, and specifically the changes being made to the TaskOrchestrator around the discovery of the internal cache implementation to be used. Based on the code comments, presumably everything will move to the DbCache approach in Nx 21. I am wondering how this will work for those of us currently using our own RemoteCache implementations. Are there any plans to support something similar to the current approach where the defaultTaskRunner accepts a RemoteCache implementation and that propagates into the appropriate slots within the TaskOrchestrator?

Just looking at things right now (which may be in a transitional state, so I'm not sure), it seems like the getCache function, and DbCache implementation (as written) would prevent these custom RemoteCache implementations from functioning given that the check being run is only accounting for circumstances where Nx Cloud is being used, and further on, the _getRemoteCache function returns null for circumstances where Nx Cloud is not being used as well. Would it be possible to continue to propagate these alternative remote cache implementations into the new DbCache implementation from the defaultTasksRunner call as we've previously been able to? Just thinking out loud, but maybe DbCache could be adjusted to take an optional RemoteCacheV2 implementation in its constructor options, and _getRemoteCache could short-circuit if this value has already been set on the DbCache instance?

If need be, I could line up a PR for this if that's something you're interested in. 😊

Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants