cloudfoundry / cloudfoundry/stratos

Cross-CF org/space filter: dedupe by name when CF=All on Applications, Services, Marketplace walls

Open
#5,376 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
267
Forks
137
Avg merge
5h 14m
Merged PRs (30d)
77

Description

Narrowed scope of #2629.

Today

Primary walls (Applications, Services, Marketplace) aggregate apps / instances / offerings across all connected CFs. CF / Org / Space dropdowns exist on each wall. When CF = "All", the Org dropdown aggregates orgs across CFs but dedupes by guidseen.set(o.guid, o.name) at src/frontend/packages/cloud-foundry/src/shared/components/list/list-types/app/cf-apps-signal-config.service.ts:233 (and equivalents in services / marketplace configs). The predicate matches by guid: if (org && app.orgGuid !== org) return false; at :314.

Result: an org named platform in prod and another named platform in staging appear as two indistinguishable-looking entries in the Org dropdown. Picking one filters to that single CF's org.

What to change

When selectedCnsi === null:

  1. orgOptions and spaceOptions dedupe by name rather than guid (seen.set(o.name, o.name)); option value becomes the name.
  2. Filter predicate matches by name in that mode: app.orgName !== org and app.spaceName !== space instead of guid-equality.
  3. When selectedCnsi !== null, behavior unchanged — pick a CF, see its orgs, filter by guid.

Apply to

  • cf-apps-signal-config.service.ts (Applications wall)
  • cf-service-instances-signal-config.service.ts (Services wall)
  • cf-service-offerings-signal-config.service.ts (Marketplace)

Plus tests covering: All-CF dedupe collapses identical names, single-CF mode unchanged, locked-space-scope unaffected.

Edge cases

  • Case sensitivity — pick a stance (platform vs Platform). Recommend case-insensitive match for permissive behavior.
  • Naming convention divergenceplatform-prod vs platform won't unify; out of scope for this ticket. Document that this fix unifies exact (or normalized) name matches; naming guidance is separate.
  • Whitespace / unicode normalization — match-by-name is fragile to invisible characters; consider a normalized comparison (trim() + normalize('NFC') at minimum).

Scope

Three frontend signal-config services + tests. Half-day estimate.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the existing orgOptions, spaceOptions, and filter predicates in cf-apps-signal-config.service.ts, then compare the equivalent logic in cf-service-instances-signal-config.service.ts and cf-service-offerings-signal-config.service.ts. Run the existing tests for these signal-config services and add coverage for identical-name deduplication in All-CF mode, unchanged single-CF behavior, and locked-space scope. Done means the three walls behave consistently while single-CF filtering remains guid-based.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
Half a day
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.