feat: Deprecate identity retrieval#1876
Merged
LautaroPetaccio merged 8 commits intomainfrom Mar 17, 2026
Merged
Conversation
…recate-identity-retrieval
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the catalyst identity resolution mechanism and replaces the
ContentClusterclass with a focused WKC-style component that only handles DAO server synchronization.Why
The content server had a startup-time identity resolution flow (
determineCatalystIdentity) that attempted to figure out whether this catalyst was registered in the DAO. It did so by calling its own/challengeendpoint up to 10 times with 2-5s intervals, which could block startup for over 20 seconds — especially when the reverse proxy (NGINX, Cloudflare) wasn't ready yet.After analysis, the identity result (
getIdentity()) was never consumed by any production code path. The only things that mattered fromContentClusterwere:getAllServersInCluster()— used by synchronization and failed deployment retriesonSyncFinished()— triggers re-sync when the server list changesgetStatus()— exposed on the/statusendpointAll of these rely on
getContentServersFromDao(), which filters servers using theCONTENT_SERVER_ADDRESSenv var — completely independent of identity resolution. TheIdentityProviderinterface,getIdentity(),determineCatalystIdentity(),getChallengeInServer(), and thechallengeSupervisordependency (for identity purposes) were dead code.How
Replaced
ContentClusterclass with a WKC factory componentThe old
ContentClusterclass (service/synchronization/ContentCluster.ts) was replaced with acreateContentClusterfactory function following the well-known-components pattern used throughout the codebase. The new component lives inlogic/cluster/with a proper module structure:component.ts— the factory function and implementationtypes.ts— theIContentClusterComponentinterfaceindex.ts— barrel exportsThe new component keeps the exact same DAO sync behavior (periodic polling, server add/remove detection, shuffle, callbacks) but drops all identity-related code.
Removed dead code
content/src/logic/cluster-helpers.ts— containeddetermineCatalystIdentity,getChallengeInServer, andnormalizeContentBaseUrl. The first two were identity-only;normalizeContentBaseUrlwas inlined into the new component.content/src/service/synchronization/ContentCluster.ts— the old class withIdentityProviderinterface,getIdentity(),identityFuture, andchallengeSupervisordependency.content/test/helpers/service/synchronization/MockedContentCluster.ts— only mockedgetIdentity(), which nothing consumed.content/test/unit/service/synchronization/ContentCluster.spec.ts— old tests focused on identity resolution.