Skip to content
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

User unable to submit a new share request when an earlier requested dataset was deleted #544

Closed
anushka-singh opened this issue Jun 30, 2023 · 1 comment · Fixed by #554
Assignees
Labels
priority: medium status: in-progress This issue has been picked and is being implemented type: bug Something isn't working

Comments

@anushka-singh
Copy link
Contributor

Describe the bug

If user requested access for a dataset, and the dataset is then deleted by producer while sharing is in progress, the user is unable to submit a new share request for any other dataset as well. The user will keep seeing an error like this: An error occured (ResourceNotFound): Resource Dataset with URI xxxxx was not found

How to Reproduce

  1. User 2 requested access to dataset 1 and submitted the request.
  2. User 1 the creator of dataset1 then deleted dataset1.
  3. User2 logged into data.all to request access to dataset2, and is able to create the request, but not submit it. The shares 4. 4. Page in SENT tab is stuck showing error: An error occured (ResourceNotFound): Resource Dataset with URI xxxxx was not found , thus preventing user2 from submitting any other requests as well.

Expected behavior

User should be able to submit another request without any problems and an older dataset deletion should not impact the user.

Your project

No response

Screenshots

No response

OS

Mac

Python version

3.9

AWS data.all version

1.5

Additional context

No response

@noah-paige noah-paige self-assigned this Jul 5, 2023
@noah-paige
Copy link
Contributor

I was able to replicate the above behavior in my local deployment of data.all

It appears the ShareObject.existingSharedItems field is not resolving to the correct value when checking if the Dataset Object has existing shared items before deleting.

@noah-paige noah-paige linked a pull request Jul 5, 2023 that will close this issue
@dlpzx dlpzx added type: bug Something isn't working status: in-progress This issue has been picked and is being implemented priority: medium labels Jul 10, 2023
noah-paige added a commit that referenced this issue Jul 10, 2023
### Feature or Bugfix
- Bugfix


### Detail
- Fix query to check dataset shares before deleting a dataset

The `existingSharedItems` property of `ShareObject` was not resolving
correctly to a `True` or `False` value but rather to `None`. The impact
is:

1. When checking a dataset's shares before deleting the dataset - we
would not raise an exception for datasets that did in fact have existing
shared items.

2. Additionally, when deleting a dataset with associated shared objects
created - we would not successfully delete the associated share object
and share object items and not clean up rows in the DB appropriately.
This caused issues when viewing the Share Tab as the dataset does not
exist but is still referenced in the outdated ShareObject and throws an
error.


### Relates
- #544 


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: medium status: in-progress This issue has been picked and is being implemented type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants