Skip to content

Adopt fw-capi quota contract fixes - #5442

Merged
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:fix/capi-quota-delete-job
Jun 12, 2026
Merged

Adopt fw-capi quota contract fixes#5442
norman-abramovitz merged 2 commits into
cloudfoundry:developfrom
nabramovitz:fix/capi-quota-delete-job

Conversation

@nabramovitz

Copy link
Copy Markdown
Contributor

Summary

Adopts three CF v3 contract fixes from fw-capi (norman-abramovitz/fw-capi#1,
merged), found by a docs-contract audit and verified live against a real CF
through make dev:

  1. Quota deletes return the async job ref — the org/space quota delete
    handlers updated for the new (*Job, error) signature; the UI contract
    stays 204-on-accepted for now (surfacing job progress is a follow-up).
  2. Quota apps field names corrected — CF v3 uses
    per_process_memory_in_mb / per_app_tasks; the previous names
    (total_instance_memory_in_mb / total_app_tasks) don't exist in the
    API, so quota create/update from the UI always failed with 422 and the
    per-process/tasks limits read back as Unlimited. Frontend wire bodies,
    jetstream accessors, and test mocks (which simulated the same wrong
    names) all corrected.
  3. Space-quota create no longer sends an invalid empty spaces
    relationship
    (fw-capi side; no Stratos code change needed beyond the
    version bump).

go.mod pins fivetwenty-io/capi/v3 to the fork tag
norman-abramovitz/fw-capi/v3 v3.216.7-quota-fixes.1 via the same
/v3-suffix replace pattern used for the earlier delete-wave fixes;
drop the directive when the fixes land in a tagged upstream release.

Testing

  • go build ./... and the cloudfoundry plugin suite pass against the
    published fork tag (no local overrides)
  • Live verification on a real CF through the UI: org quota create (201)
    and delete (204); space quota create (201) and delete (204) — both
    delete jobs observed via the Location header
  • Mock-vocabulary sweep against the documented CF contract found no
    further latent field-name discrepancies in the plugin test fixtures

fw-capi corrected three CF v3 contract discrepancies found by a
docs-contract audit and verified live: quota delete methods now
return the async job ref, the quota apps field names match real
CF (per_process_memory_in_mb / per_app_tasks), and empty spaces
relationships are omitted on create.

Jetstream: delete handlers discard the job for now (UI contract
stays 204-on-accepted), read mappers use the corrected accessors,
and test mocks simulate real CF payload field names. Frontend:
quota wire bodies send the correct field names. Stratos's own
outward API field names are unchanged.

Verified end to end against a real CF through make dev: org and
space quota create (201) and delete (204) through the UI.
replace fivetwenty-io/capi/v3 with norman-abramovitz/fw-capi/v3
at v3.216.7-quota-fixes.1 (fork main after PR #1: async-delete
job refs, quota apps field names, optional spaces relationship).
Same /v3-suffix replace pattern used for the earlier delete-wave
fixes; drop the directive when the fixes land upstream in a
tagged fivetwenty-io release.

@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

@norman-abramovitz
norman-abramovitz merged commit 08e1406 into cloudfoundry:develop Jun 12, 2026
12 checks passed
@nabramovitz
nabramovitz deleted the fix/capi-quota-delete-job branch June 12, 2026 05:38
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