Replies: 19 comments 31 replies
-
Thank you for or this detailed rfc. Curiosity, your first class packages, will their now be staying put? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the proposal. This will help to solve the most cases. Also previously NX cache API had an interface like getCache(...cacheHashes) which return {[cacheHash] {get: s3 presignURL, set: s3 presignURL} which NX uses to read/write cache. This interface was good because allow to avoid a lot of traffic from API and moved it directly to S3. If it possible to implement it will be the best solution |
Beta Was this translation helpful? Give feedback.
-
I completely agree with @Tom910. This would be very close to the implementation of the previous API. |
Beta Was this translation helpful? Give feedback.
-
Check out the draft project for custom self-hosted server IKatsuba/nx-cache-server with S3 as storage |
Beta Was this translation helpful? Give feedback.
-
In the previous version token and url were declared in |
Beta Was this translation helpful? Give feedback.
-
Will that be a remote cache solution just for CI, or local + CI? If it is local + CI, I think it would be important to make push/pull based on the environment, because I would not want a local environment to push to the cache, only pull to avoid any possibility of cache poisoning. |
Beta Was this translation helpful? Give feedback.
-
This is great. Thank you so much @vsavkin and team for allowing this to happen. I have two somewhat minor technical questions / callouts.
|
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
This implementation seems reasonable. Thank you for listening the community. |
Beta Was this translation helpful? Give feedback.
-
I find it unusual to have a PUT endpoint without a corresponding POST. In REST, POST is usually for creating resources, while PUT is for updating or replacing them at a known URI. Also, I noticed there's a hash used in the PUT—is the idea to keep updating the same resource under that hash? Just trying to understand the design choice here—maybe I'm missing something. |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
First of all, thanks for the RFC and shifting approach from the initial Nx 20/21 cache plan. This is much appreciated and the RFC here would do what we need, albeit with a bit less flexibility than what we currently do. With our current runner I gather extra information about the task to provide to the get and put equivalents. This extra metadata helps debug cache issues and inspect cache entries, but we also print some of it when fetching data from the cache to make it easier to see where cached data came from, and when it was made. What would be nice would be to have a JSON object with more information in a header with the Useful data:
As an example, a log line when using a remote cached download in CI looks like this for us right now: |
Beta Was this translation helpful? Give feedback.
-
Folks, This has been released. You can see the docs here: https://nx.dev/recipes/running-tasks/self-hosted-caching#build-your-own-caching-server Thank you so much to everyone who contributed to this! |
Beta Was this translation helpful? Give feedback.
-
With the Not being able to override the bucketName means we cannot use different buckets for different CI environment runs. This to me feels like something that the Is this feature on the roadmap? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Will you specify a different license than
In any case a spdx identifier would be nice. |
Beta Was this translation helpful? Give feedback.
-
Using self-hosted cache is documented as "free for everyone" now, with an activation key for marketing purposes. However, it does not work. "No Nx keys were found for this organization. Please visit https://cloud.nx.app/powerpack to purchase or renew your key". So, how can we create a free activation key to cache on our own s3 bucket? |
Beta Was this translation helpful? Give feedback.
-
Question to NX folks, what does the activation key do? Is this used for tracking telemetry? What data is tracked or linked ? Are repository information going to be exposed to NX if I wanted to go with the @nx/azure-cache package for example for an enterprise repo? |
Beta Was this translation helpful? Give feedback.
-
Thanks for keeping self-hosted caching! I know I'm late to be providing feedback, but I believe my PUT/GET endpoints are going to require basic auth due to reasons out of my control. Perhaps I'm missing something, but I don't see a way to handle this today. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Due to our ongoing rewrite of Nx core from TypeScript to Rust, we are removing the ability to load custom code during task execution. We want this part to be heavily optimized with strong guarantees. To support users who need self-hosted cache solutions, we've created several free first-party packages for all major cloud providers (S3, MinIO, GCP, Azure). The packages are more secure and faster than existing self-hosted solutions. Moving from existing self-hosted cache solutions to the new packages should be straightforward.
We recognize that some organizations require more flexibility. Since we can no longer load custom code, we're offering this flexibility in a different way. Similar to other build systems, we're adding an HTTP-based API that allows you to connect your Nx workspace to a service offering self-hosted cache. This RFC provides an OpenAPI spec and some notes on how the cache will be activated.
We will be implementing with this spec for Nx 21 which will be released soon.
Open API Spec
Activating Remote Cache
Set the following environment variables:
Nx will include the access token as part of the payload.
Beta Was this translation helpful? Give feedback.
All reactions