-
Notifications
You must be signed in to change notification settings - Fork 64
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 an org to be complete #2605
Comments
[#2605] - Add check for org deletion timeout with message - Calculate status for deletion based on presence of CRD and its timestamp
[#2605] - Add check for org deletion timeout with message - Calculate status for deletion based on presence of CRD and its timestamp Co-authored-by: Dave Walter <walterda@vmware.com>
[#2605] - Add check for org deletion timeout with message - Calculate status for deletion based on presence of CRD and its timestamp Co-authored-by: Dave Walter <walterda@vmware.com>
- Add check for org deletion timeout with message - Calculate status for deletion based on presence of CRD and its timestamp [#2605] Co-authored-by: Dave Walter <walterda@vmware.com>
- Add check for org deletion timeout with message - Calculate status for deletion based on presence of CRD and its timestamp [#2605] Co-authored-by: Dave Walter <walterda@vmware.com>
- Add check for org deletion timeout with message - Calculate status for deletion based on presence of CRD and its timestamp [#2605] Co-authored-by: Dave Walter <walterda@vmware.com>
I did a round of acceptance on this change, and it did not behave as expected. I used the cf-admin user to create an org, but the
|
[#2605] Co-authored-by: Dave Walter <walterda@vmware.com>
[#2605] 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>
[#2605] 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>
[#2605] 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>
I just confirmed that all but 1 of the Acceptance Criteria are met. When the deletion was in progress, I got this response: {
"created_at": "",
"errors": [],
"guid": "org.delete~cf-org-4eda0dac-4878-40b1-9d6c-f62f6b1e1909",
"links": {
"self": {
"href": "https://localhost/v3/jobs/org.delete~cf-org-4eda0dac-4878-40b1-9d6c-f62f6b1e1909"
}
},
"operation": "org.delete",
"state": "PROCESSING",
"updated_at": "",
"warnings": null
} When the org was successfully deleted, I got this response: {
"created_at": "",
"errors": [],
"guid": "org.delete~cf-org-f8e2b0c7-7854-40c8-abcf-9f317b1f2926",
"links": {
"self": {
"href": "https://localhost/v3/jobs/org.delete~cf-org-f8e2b0c7-7854-40c8-abcf-9f317b1f2926"
}
},
"operation": "org.delete",
"state": "COMPLETE",
"updated_at": "",
"warnings": null
} When I added a finalizer to the {
"created_at": "",
"errors": [
{
"code": 10008,
"detail": "Org deletion timed out, check the remaining \"cf-org-4eda0dac-4878-40b1-9d6c-f62f6b1e1909\" resource",
"title": "CF-UnprocessableEntity"
}
],
"guid": "org.delete~cf-org-4eda0dac-4878-40b1-9d6c-f62f6b1e1909",
"links": {
"self": {
"href": "https://localhost/v3/jobs/org.delete~cf-org-4eda0dac-4878-40b1-9d6c-f62f6b1e1909"
}
},
"operation": "org.delete",
"state": "FAILED",
"updated_at": "",
"warnings": null
} When I queried the job status for a non-existent org, I got this response: {
"created_at": "",
"errors": [],
"guid": "org.delete~no-such-org",
"links": {
"self": {
"href": "https://localhost/v3/jobs/org.delete~no-such-org"
}
},
"operation": "org.delete",
"state": "COMPLETE",
"updated_at": "",
"warnings": null
} The failed acceptance criterion is that when I queried the job status for an org that I don't have access to, I got this response: {
"errors": [
{
"code": 10010,
"detail": "Job not found. Ensure it exists and you have access to it.",
"title": "CF-ResourceNotFound"
}
]
} What I should have gotten was the "COMPLETE" response. I'll put this story back in the queue for the issue to be addressed. |
Before this change, the job endpoint would say that an org was deleted as soon as the CFOrg finalizer removed their role binding from the Org namespace. We now fetch the CFOrg directly to determine if it's done deleting. If it isn't deleting, then we will use GetOrg to determine if the user has access to the org [#2605]
Before this change, the job endpoint would say that an org was deleted as soon as the CFOrg finalizer removed their role binding from the Org namespace. We now fetch the CFOrg directly to determine if it's done deleting. If it isn't deleting, then we will use GetOrg to determine if the user has access to the org [#2605]
Background
As a developer
I want to know when an org has finished deleting
So that I can plan other operations accordingly
Dev Notes
Acceptance Criteria
GIVEN I have an org
WHEN I delete the org
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 org 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 org 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 org
WHEN I get the deletion job
THEN I still see a
COMPLETE
response like the aboveGIVEN an org 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: