Skip to content

A.#13a: delete vestigial app-instances + app-variables legacy configs#5345

Merged
norman-abramovitz merged 4 commits into
cloudfoundry:developfrom
nabramovitz:feature/a13a-delete-vestigial-app-list-configs
May 18, 2026
Merged

A.#13a: delete vestigial app-instances + app-variables legacy configs#5345
norman-abramovitz merged 4 commits into
cloudfoundry:developfrom
nabramovitz:feature/a13a-delete-vestigial-app-list-configs

Conversation

@nabramovitz
Copy link
Copy Markdown
Contributor

@nabramovitz nabramovitz commented May 18, 2026

Summary

Spike of A.#13 (apps-wall data-source bundle) found that 2 of the 5 candidate data sources are fully vestigial — both signal-native and legacy paths are wired, but only the signal path is reachable from any routed UI. This PR removes the dead legacy path:

  • cf-app-instances-data-source.ts — never instantiated outside its sibling config file
  • cf-app-instances-config.service.ts + spec — referenced only by comments in the signal-config / instances-tab
  • cf-app-variables-data-source.ts — never instantiated outside its sibling config file
  • cf-app-variables-list-config.service.ts + spec — referenced only by comments in the signal-config

The remaining 3 candidates from the original A.#13 plan stay deferred:

  • cf-apps-data-source.ts — runtime-vestigial but exports a paginationKey + includeRelations consumed by create-application / deploy-application (themselves still ngrx; goes with A.Creating event bus service #15)
  • cf-space-apps-data-source.service.ts — still drives the live cloud-foundry-space-apps page via the legacy ListComponent/ListConfig pattern (real migration, A.#13b)
  • cf-space-routes-data-source.ts — same shape for the space-routes page (A.#13b)

Commit slices

  1. Extract ListAppEnvVar to its own types module — 5 live consumers (signal-config, variables-tab, table-cell-edit-variable + spec, app-variables actions, application-env-var action-builders) used to pull this 3-field type from the data-source file. Lifting to cf-app-variables.types.ts unblocks deletion. Also drops the 6 vestigial files.
  2. Extract createAppInstancesMetricAction helperapp.effects.ts imports this 7-line helper from the now-deleted instances config file. Moved to its own cf-app-instances-metrics-action.ts module.
  3. Scrub stale comment references to deleted legacy configs — the signal-configs + instances-tab + app-variables.effects carried multi-paragraph migration-context comments naming the now-deleted classes. Comments rewritten to describe current behavior + WHY only.
  4. Bump to dev.92 for PR validation deploy.

Why this matters

This eliminates 2 of B.2's 26 live blockers for the entity-relations module deletion. Three more PRs (A.#13b + A.#15 + A.#5/8/9 followups) push the rest down before B.2 can ship.

Test plan

  • vitest run app-instance app-variables variables-tab — 61 tests pass
  • vitest run app-instances-signal app-variables-signal variables-tab (post-comment-scrub) — 29 tests pass
  • Full make check gate — left for PR CI
  • Smoke: app-detail Instances tab renders + filters + Terminate flow
  • Smoke: app-detail Variables tab renders + filters + Add/Edit/Delete flow

Merge as Create a merge commit to preserve the 4-slice identity.

The legacy CfAppVariablesDataSource hosted the ListAppEnvVar
interface as a side-export — five consumers (signal-config,
variables-tab, table-cell-edit-variable + its spec, app-variables
actions, application-env-var action-builders) all pulled it from the
data-source file. Lifting the type to a tiny cf-app-variables.types.ts
unblocks deleting the now-vestigial data-source + legacy list-config
in the next slice.

Pure import-path shuffle; ListAppEnvVar shape is unchanged.
The cf-app-instances-config.service.ts (now deleted in the prior
commit) hosted a 7-line createAppInstancesMetricAction helper that
app.effects.ts pulls in to fire the firehose CPU metric query on
UpdateExistingApplication. Lifting the helper to its own
cf-app-instances-metrics-action.ts module kept that effect path
intact across the legacy-config deletion.

Pure import-path shuffle; helper shape is unchanged.
The signal-configs + instances-tab + app-variables.effects carried
multi-paragraph context comments naming the now-deleted legacy
classes (CfAppInstancesConfigService, CfAppVariablesListConfigService,
cf-app-variables-data-source.ts:56/66, …). Those references were
historical migration notes — useful at extraction time, rotted once
the legacy files left the tree.

Comments rewritten to describe current behavior + WHY only — no
mention of "legacy / mirrors / replaces / was-in-X.ts". Migration
history lives in git log; the source files should read as if signal
was always the implementation.
@linux-foundation-easycla
Copy link
Copy Markdown

CLA Not Signed

Copy link
Copy Markdown
Contributor

@norman-abramovitz norman-abramovitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing dead code

@norman-abramovitz norman-abramovitz merged commit ffb393f into cloudfoundry:develop May 18, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants