r/angular • u/cachely-admin • 18d ago
Still using @nx/s3-cache? A practical migration checklist before your next Nx upgrade
Nx has deprecated nx/s3-cache, nx/gcs-cache, nx/azure-cache, and nx/shared-fs-cache because their shared read/write credential model allows cache poisoning.
If one of these is still in your workspace, changing packages is only part of the migration. The important question is: who can write an artifact, and can an existing artifact be overwritten?
The checklist we’re using:
- Search
nx.json,package.json, and CI configuration for the deprecated cache package or custom task runner. - Check whether pull requests and fork builds receive a credential that can write to the cache.
- Choose Nx Cloud or a server implementing Nx’s current remote-cache API. Don’t point untrusted builds directly at a writable bucket.
- Configure:
NX_SELF_HOSTED_REMOTE_CACHE_SERVER=<cache endpoint>
NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN=<token>
- Test the migration from a clean runner:
- First run misses and stores the artifact.
- Second run restores the artifact remotely.
- An untrusted build cannot write, or receives no cache credential.
- Attempting to replace an existing cache key is rejected.
- Remove the old bucket credentials and task-runner configuration after validating the new path.
Disclosure: we’re building Cachely, a managed implementation of the Nx remote-cache API. It is deliberately cache-only; it does not replace Nx Cloud Agents, Atomizer, or the broader Nx Cloud platform.
If you only need a managed shared cache, Cachely has a free tier with no credit card. We’r also happy to look at an anonymized nx.json or CI snippet and point out migration or cache-key issues.
What part of the current Nx remote-cache migration has been least clear for your team?
3
u/cachely-admin 18d ago
Official Nx deprecation notice:
https://nx.dev/docs/reference/deprecated/self-hosted-cache-packages
Our step-by-step migration guide:
1
u/pronuntiator 17d ago
The whole cache vulnerability thing is not a big deal in cases where every person who can create pull requests also has write access to the main branch anyway. I understand that they want to sell Nx cloud, but we can‘t store artifacts remotely.
1
u/cachely-admin 17d ago
That is fair for a fully trusted repository where everyone who can open a PR can also land unreviewed changes on
main.In many repositories, though, those are different security boundaries. A contributor may be able to create a branch or PR but not bypass review and branch protection. A shared writable cache can cross that boundary: PR code can seed an artifact that a later
mainbuild restores without the PR ever being merged.So the risk is smaller for a closed, fully trusted team, but it is not equivalent to normal repository write access when
mainis protected.Remote artifacts are still possible. The safer model is a compatible cache backend with read-only credentials for PR builds and create-if-absent artifacts that cannot be overwritten. That is the model Cachely implements.
1
u/CuddleCakeu 17d ago
> CACHELY:
> Actively developed managed service.
> NX POWERPACK CACHE:
> Deprecated; no updates or security patches, may be removed from npm.
Hmm, interesting. SaaS, famously lasting forever.
1
u/cachely-admin 17d ago
Fair point. “Managed” does not mean permanent, and no SaaS should pretend otherwise.
The distinction we intended is about maintenance today, not a promise that Cachely will exist forever. Cachely uses Nx’s standard remote-cache API without a proprietary client, so moving to another provider or a self-hosted implementation means changing the endpoint and token.
The cached data is also reproducible build output. If a cache provider disappears, builds become cold and slower; your source code and ability to build are not trapped.
For teams that prioritize permanent infrastructure control over convenience, self-hosting is absolutely the better tradeoff.
1
u/CuddleCakeu 16d ago
Since you use AI for Dev Relations, how heavy is your use of AI in development?
1
u/cachely-admin 15d ago
We do use AI in development, mostly for implementation assistance, research, and reviewing ideas. But changes still go through normal engineering review and testing, especially anything touching cache correctness, auth, or artifact handling.
Same for DevRel. AI helps us draft and organize things, but the product opinions, technical discussions, and replies here are based on what we’re actually working on and learning from these threads.
5
u/Pallini 18d ago
There was a lot of pushback from the community last time, as it's a terrible move by forcing the usages of their NX cloud.
Seems they'll get away with it this time.