Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Ability to revoke/cancel a request #525

Closed
adriaaaa opened this issue May 17, 2022 · 2 comments · Fixed by #592
Closed

Ability to revoke/cancel a request #525

adriaaaa opened this issue May 17, 2022 · 2 comments · Fixed by #592
Assignees
Labels
enhancement New feature or request

Comments

@adriaaaa
Copy link

adriaaaa commented May 17, 2022

Description

A privacy request manager may need to cancel a request in case it was submitted in error or approved in error. Furthermore, as part of Consumer Report's DRP specification, they do require support for revoking a request in the event that the consumer chooses to do so.

This may be challenging to do for in progress requests at this time. We have limited the scope of this ticket to support cancelling a request only if the request is in a NEW state.

Acceptance Criteria

  1. Demonstrate that a request can be cancelled (limit to only requests that haven't started processing aka NEW requests)
  2. If a request was cancelled, demonstrate that the status of the request moves to "Cancelled"
  • on the SR landing/list page, we should update the status dropdown to include "cancelled" as a filterable status
  • you should not be able to restart cancelled requests (users should submit new requests)
@adriaaaa adriaaaa added the enhancement New feature or request label May 17, 2022
@seanpreston
Copy link
Contributor

In the pointing of this ticket we're assuming that the frontend requires only an extra Enum to document the new cancelled status.

@pattisdr
Copy link
Contributor

pattisdr commented Jun 3, 2022

#418

seanpreston pushed a commit that referenced this issue Jun 23, 2022
* Add the ability to cancel a pending task.  The celery task is not actually cancelled yet.

- Track cancel reason, datetime cancelled, and add a new cancelled status.

* Add drp revoke request to postman collection.

* Add drp revoke docs.

* Update down_rev after rebase.

* Fix incorrect check.

* Restore new canceled state.

* Check that the privacy request is not canceled right before starting execution.  This is really our last chance to check before we start executing the graph in dask.    The use case here might be it was canceled shortly after it was approved.

* Attempt to revoke a queued celery task if we cancel it before it starts executing.

* Prettier.

* Changelog updated.

* Add a few unit tests around how triggering the run_privacy_request_task with a cancelled task id doesn't do anything and how you can't approve a canceled privacy request.

* Fix SQLAlchemy logging to console - logging in migration propagates to the rest of the application.

* Refresh session instead of creating a new one.

* Add 200 character limit.

* Add some assertions that db.refresh is doing what we think it's doing.
sanders41 pushed a commit that referenced this issue Sep 22, 2022
* Add the ability to cancel a pending task.  The celery task is not actually cancelled yet.

- Track cancel reason, datetime cancelled, and add a new cancelled status.

* Add drp revoke request to postman collection.

* Add drp revoke docs.

* Update down_rev after rebase.

* Fix incorrect check.

* Restore new canceled state.

* Check that the privacy request is not canceled right before starting execution.  This is really our last chance to check before we start executing the graph in dask.    The use case here might be it was canceled shortly after it was approved.

* Attempt to revoke a queued celery task if we cancel it before it starts executing.

* Prettier.

* Changelog updated.

* Add a few unit tests around how triggering the run_privacy_request_task with a cancelled task id doesn't do anything and how you can't approve a canceled privacy request.

* Fix SQLAlchemy logging to console - logging in migration propagates to the rest of the application.

* Refresh session instead of creating a new one.

* Add 200 character limit.

* Add some assertions that db.refresh is doing what we think it's doing.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants