refactor(deploy-app): drop deployApplication ngrx slice for signal-native - #5380
Merged
norman-abramovitz merged 3 commits intoMay 26, 2026
Conversation
…ntainer Replaces the toSignal(store.select(...)) read-only bridge with a WritableSignal that owns the wizard's cross-step state directly. The service is now the single source of truth for cf details, source type, git/docker app details, overrides, and the project-exists probe — so consumers can read AND write through one signal-native interface instead of dispatching @ngrx actions. The legacy DeployAppEffects.checkAppExists$ pipeline (CheckProjectExists → scm.getRepository() → ProjectExists/ProjectDoesntExist/ProjectFetchFail) collapses into a single checkProjectExists(scm, projectName) async method that maintains the same three-phase observable contract for the github-project-exists form validator. Spec rewritten to test the new signal API directly; no mock store required. Refs cloudfoundry#5045 followup
…tive Migrates every consumer of the deployApplication reducer to read/write through CfDeployAppDataService instead of dispatching @ngrx actions or selecting from the store: deploy-application.component StoreCFSettings, DeleteDeployAppSection, selectApplicationSource deploy-application-step2.component SaveAppDetails ×3, SetAppSourceDetails, SetBranch ×2, SetDeployBranch ×2, ProjectDoesntExist deploy-application-step2-1.component SetDeployCommit deploy-application-options-step.component SaveAppOverrides deploy-application-step3.component DeleteDeployAppSection github-project-exists.directive CheckProjectExists github-commits-list-config-app-tab StoreCFSettings, CheckProjectExists, SetAppSourceDetails, SetDeployBranch, SetDeployCommit github-commits-list-config-deploy selectApplicationSource RouterNav dispatches in the wizard remain on @ngrx/store — the router slice is its own workstream and not part of the deployApplication slice removal. Deletes the now-unreferenced reducer, effect, selectors, and action classes (351 lines across 4 files) plus the StoreModule.forFeature registration in cloud-foundry.reducers.module.ts and the DeployAppEffects registration in cloud-foundry.store.module.ts + cloud-foundry-test.module.ts. CFAppState loses its deployApplication field. public_api.ts drops the CheckProjectExists and selectDeployAppState exports (no external consumers; verified via grep across src/frontend and src/extensions). Refs cloudfoundry#5045 followup
Two specs (deleteServiceBinding, deleteRoute) passed httpMock objects with only a delete() method. EndpointDataService (providedIn: 'root') is wired up via DI when CfAppsSignalConfigService is constructed, and its load() path calls this.http.get(...) — which threw "this.http.get is not a function" as an uncaught exception during the test, polluting the cloud-foundry vitest output with 2 errors. Tests passed regardless because the assertion ran before the async EndpointDataService.load chain blew up, but the noise hid real regressions. Adding the makeHttp().get baseline to both mocks drops the cloud-foundry uncaught-exception count from 25 → 23.
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.
Summary
Migrates the deploy-application wizard's cross-step state from an
@ngrx reducer + effect to a signal-native service. CfDeployAppDataService
now owns the wizard slice directly as a WritableSignal and exposes
async checkProjectExists() in place of the legacy CheckProjectExists
action + DeployAppEffects pipeline.
deployApplicationis no longer aStoreModule.forFeatureslicedeployApplicationfieldCheckProjectExistsandselectDeployAppStateremoved (verified zero external consumers under src/frontend and
src/extensions)
is a separate workstream, not in this PR's scope)
Followup to #5379 (file-upload deploy fix). Same migration spirit —
removing the ngrx mediation layer between the wizard and its own state.
Test plan
bun run test— 2344 passed, 3 skipped, no new failuresmake check gate— lint + unit tests + production build all greenthree-phase checkProjectExists contract (200 / 404 / error)
(deleteServiceBinding / deleteRoute) — drops vitest's
uncaught-exception count by 2
(verified during fix(deploy-application): restore file-upload deploy + drop deployer ngrx #5379 work; same code path)