Skip to content

feat(cf): restore the full set of CF bulk operations with guard tests - #5664

Merged
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:feat/cf-bulk-operations
Jul 21, 2026
Merged

feat(cf): restore the full set of CF bulk operations with guard tests#5664
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:feat/cf-bulk-operations

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Why

The CF console's multi-select bulk operations had been eroded over successive
migrations — several were lost entirely and kept being re-classified as
"greenfield" and deferred. This restores the full set and, critically, adds a
guard test to each so a future rewrite or force-push can't silently drop them
again (the tripwire that was missing every prior time).

Routes (Unmap/Delete) and Users (Manage Roles) bulk already existed and are
untouched. This PR covers the remaining eight surfaces.

What

Backend (src/jetstream/plugins/cloudfoundry/)

  • Apps bulk delete: POST /cf/apps/:cnsi/bulk/delete — fan-out N
    Apps().Delete via the shared bulkFanout (mirrors routes bulk), per-item
    BulkResult.
  • Single relationship-array passthroughs (CF accepts the target GUID array
    natively): isolation segment entitle orgs, service instance share spaces,
    security group bind running/staging spaces, private domain share orgs. Body
    is the shared {"guids":[...]} shape via decodeBulkGUIDs.
  • Org/space quota apply and service-plan visibility already had endpoints.
  • Each handler has table tests (success, CF-error propagation, body validation).

Frontend (src/frontend/packages/cloud-foundry/)

  • Space Apps tab: checkbox column + bulk Delete.
  • Org/Space Quota detail: "Apply to organizations/spaces" multi-select dialogs.
  • Service Instance detail: "Share to spaces" (managed-only).
  • Security Groups tab: per-row "Bind to spaces" (running/staging).
  • Service plan visibility: a new self-contained multi-org apply editor.
  • Isolation segment / private domain: service method + multi-select dialog,
    built and unit-guarded but not yet mounted (those entities have no
    management page) — tracked in CF bulk operations: host pages for isolation segments, private domains, and plan visibility #5663.

Every surface ships a guard unit test that fails if the affordance is removed.

Verification

  • Backend: CGO_ENABLED=0 go build ./..., go vet, gofmt all clean; all new
    handler tests pass.
  • Frontend: 60 guard/dialog unit tests pass; Angular AOT build clean (0 errors).

Follow-up

…ites

Adds the backend for the full CF bulk-operations set, reusing the shared
fan-out infra in native_bulk.go where CF has no batch endpoint and single
relationship-array passthroughs where it does:

- apps bulk delete: POST /cf/apps/:cnsi/bulk/delete — fan-out N Apps().Delete
  via bulkFanout (mirrors bulkDeleteNativeRoutes), per-item BulkResult.
- isolation segment entitle orgs, service instance share spaces, security
  group bind running/staging spaces, private domain share orgs — single
  passthrough calls (CF accepts the target GUID array natively), body decoded
  by the shared decodeBulkGUIDs {"guids":[...]}.

Org/space quota apply and service-plan visibility already had endpoints.
Each handler has table tests (success, CF-error propagation, body validation).
CGO=0 build, go vet, and gofmt all clean.
Restores the frontend bulk-operation affordances across the CF surfaces, each
wired to its backend endpoint and each shipping a guard test so the affordance
can't be silently dropped again:

- Space Apps tab: checkbox column + bulk Delete (bulkDeleteApps) mirroring the
  routes bulk pattern.
- Org/Space Quota detail: "Apply to organizations/spaces" multi-select dialogs.
- Service Instance detail: "Share to spaces" (managed-only) dialog.
- Security Groups tab: per-row "Bind to spaces" (running/staging) dialog.
- Service plan visibility editor: multi-org apply (new self-contained editor).
- Isolation segment / private domain: service method + multi-select dialog
  (built and unit-guarded; both entities lack a management host page, so the
  dialogs ship ready but unmounted — a host surface wires them in later).

60 guard/dialog unit tests pass; Angular AOT build clean.

@norman-abramovitz norman-abramovitz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM - Still needs live and e2e tests

@norman-abramovitz
norman-abramovitz merged commit d0b0bf7 into cloudfoundry:develop Jul 21, 2026
22 checks passed
@nabramovitz
nabramovitz deleted the feat/cf-bulk-operations branch July 21, 2026 09:04
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