-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: Developer can wait for the deletion of a space to be complete #2604
Comments
- Refactor org deletion helper to handle all types. [#2604] Co-authored-by: Dave Walter <walterda@vmware.com>
- Refactor org deletion helper to handle all types. [#2604] Co-authored-by: Dave Walter <walterda@vmware.com>
- Add a retry loop to wait for the deletion timestamp to propagate. - Added a GetOrgForDeletion function to the org repository to avoid falsely returning a not found error when the role binding is deleted from an org during deletion. - Consolidate CFSpaceRepository and SpaceRepository interfaces. [#2604] [#2605] Co-authored-by: Dave Walter <walterda@vmware.com> Co-authored-by: Julian Hjortshoj <hjortshojj@vmware.com>
- Refactor org deletion helper to handle all types. [#2604] Co-authored-by: Dave Walter <walterda@vmware.com>
- Add a retry loop to wait for the deletion timestamp to propagate. - Added a GetOrgForDeletion function to the org repository to avoid falsely returning a not found error when the role binding is deleted from an org during deletion. - Consolidate CFSpaceRepository and SpaceRepository interfaces. [#2604] [#2605] Co-authored-by: Dave Walter <walterda@vmware.com> Co-authored-by: Julian Hjortshoj <hjortshojj@vmware.com>
- Add a retry loop to wait for the deletion timestamp to propagate. - Added a GetOrgUnfiltered function to the org repository to avoid falsely returning a not found error when the role binding is deleted from an org during deletion. - Consolidate CFSpaceRepository and SpaceRepository interfaces. [#2604] [#2605] Co-authored-by: Dave Walter <walterda@vmware.com> Co-authored-by: Julian Hjortshoj <hjortshojj@vmware.com>
- Refactor org deletion helper to handle all types. [#2604] Co-authored-by: Dave Walter <walterda@vmware.com>
- Add a retry loop to wait for the deletion timestamp to propagate. - Added a GetOrgUnfiltered function to the org repository to avoid falsely returning a not found error when the role binding is deleted from an org during deletion. - Consolidate CFSpaceRepository and SpaceRepository interfaces. [#2604] [#2605] Co-authored-by: Dave Walter <walterda@vmware.com> Co-authored-by: Julian Hjortshoj <hjortshojj@vmware.com>
This story passed the acceptance criteria. When the space was deleting but hadn't completed, I got a 200 with this body: {
"created_at": "",
"errors": [],
"guid": "space.delete~cf-space-a0ad8c07-fd70-4d70-9458-d870578de5e5",
"links": {
"self": {
"href": "https://localhost/v3/jobs/space.delete~cf-space-a0ad8c07-fd70-4d70-9458-d870578de5e5"
}
},
"operation": "space.delete",
"state": "PROCESSING",
"updated_at": "",
"warnings": null
} When the space finished deleting, I got a 200 with this body: {
"created_at": "",
"errors": [],
"guid": "space.delete~cf-space-a0ad8c07-fd70-4d70-9458-d870578de5e5",
"links": {
"self": {
"href": "https://localhost/v3/jobs/space.delete~cf-space-a0ad8c07-fd70-4d70-9458-d870578de5e5"
}
},
"operation": "space.delete",
"state": "COMPLETE",
"updated_at": "",
"warnings": null
} When I added a fake finalizer to the CFSpace so it would never delete, I eventually got a 200 with this body: {
"created_at": "",
"errors": [
{
"code": 10008,
"detail": "Space deletion timed out, check the remaining \"cf-space-76917ca6-3dff-4baa-ad16-6c36549683b6\" resource",
"title": "CF-UnprocessableEntity"
}
],
"guid": "space.delete~cf-space-76917ca6-3dff-4baa-ad16-6c36549683b6",
"links": {
"self": {
"href": "https://localhost/v3/jobs/space.delete~cf-space-76917ca6-3dff-4baa-ad16-6c36549683b6"
}
},
"operation": "space.delete",
"state": "FAILED",
"updated_at": "",
"warnings": null
} When I requested the job status for a non-existent space, I got a 200 with this body: {
"created_at": "",
"errors": [],
"guid": "space.delete~nosuchspace",
"links": {
"self": {
"href": "https://localhost/v3/jobs/space.delete~nosuchspace"
}
},
"operation": "space.delete",
"state": "COMPLETE",
"updated_at": "",
"warnings": null
} When querying the status of a space that I don't have access to I received a 200 with this body: {
"created_at": "",
"errors": [],
"guid": "space.delete~cf-space-34f3090f-5742-40c8-bcaa-adcc6a034b83",
"links": {
"self": {
"href": "https://localhost/v3/jobs/space.delete~cf-space-34f3090f-5742-40c8-bcaa-adcc6a034b83"
}
},
"operation": "space.delete",
"state": "COMPLETE",
"updated_at": "",
"warnings": null
} When the job doesn't exist, I got a 404 with this body: {
"errors": [
{
"code": 10010,
"detail": "Job not found. Ensure it exists and you have access to it.",
"title": "CF-ResourceNotFound"
}
]
} |
Background
As a developer
I want to know when a space has finished deleting
So that I can plan other operations accordingly
Dev Notes
Acceptance Criteria
GIVEN I have a space
WHEN I delete the space
AND I follow the redirect to the deletion job
THEN I see that the job looks like this:
GIVEN I have waited long enough for the space deletion to successfully complete
WHEN I get the deletion job
THEN I see it looks like this:
GIVEN I have waited long enough for the org deletion to time out
WHEN I get the deletion job
THEN I see it looks roughly like this:
GIVEN the space doesn't exist
WHEN I get the deletion job
THEN I still see a
COMPLETE
response like the aboveGIVEN I have no permissions to get the space
WHEN I get the deletion job
THEN I still see a
COMPLETE
response like the aboveGIVEN a space that hasn't been deleted
WHEN I get the deletion job
THEN I get a
404 Not Found
The text was updated successfully, but these errors were encountered: