-
Notifications
You must be signed in to change notification settings - Fork 82
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
Handle Error on clean up share and not get stuck in IN_PROGRESS status #1099
Conversation
backend/dataall/modules/dataset_sharing/services/data_sharing_service.py
Show resolved
Hide resolved
clean_up_folder.delete_dataset_bucket_key_policy(dataset=dataset) | ||
|
||
return True | ||
log.info("##### Cleaning up folder share resources #######") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a quick fix - we may want to make folder revoke better and add the clean up steps as part of the def process_revoked_share()
Otherwise, revoking a folder item may not clean up all of the resources before reaching a REVOKE_SUCCEEDED
state
For now leaving design as is and just implementing fix so we don't run into larger issues when upgrading DA and revoking items
backend/dataall/modules/dataset_sharing/services/data_sharing_service.py
Show resolved
Hide resolved
Testing it in AWS and provoking a failure by removing pivot role permissions. But then, the revoke as a whole succeeds and the share item appears as revoke succeeded (because the revoke for each folder individually was indeed a success in But in short, this PR solves the main issue = shares stuck in in-progress 🆗 |
New Issue to pick up later to improve the clean up of folders - #1101 |
Feature or Bugfix
Detail
Scenario
Issue
def clean_up_share()
and remove the inline policiesResolution
def clean_up_share()
method for revoke folder item in a try/except blockSecurity
Please answer the questions below briefly where applicable, or write
N/A
. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)?
eval
or similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.