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

[BUG] Share expiration tasks fails when share is already revoked and has expiration #1749

Open
TejasRGitHub opened this issue Jan 10, 2025 · 0 comments

Comments

@TejasRGitHub
Copy link
Contributor

Describe the bug

When running share expiration task, all active shares with expiration are pulled in along with the share item

The current logic of updating the share item status puts all the share items in revoke_approved state and then revokes the share. While fetching the share items it only pull in the 'Share_Succeeded' state and then makes the transition

There is a bug in which if a share has all the share items in revoke succeeded state and then if the share also has an expiration date, then it calls the revoke_share function which results in the following error

An error occurred (UnauthorizedOperation) when calling RevokeItems operation: This transition is not possible, Revoke_Succeeded cannot go to ['Revoke_Approved']. If there is a sharing or revoking in progress wait until it is complete and try again. For share extensions delete unused items and try again

How to Reproduce

*P.S. Please do not attach files as it's considered a security risk. Add code snippets directly in the message body as much as possible.*

Create a share with expiration ( by enabling expiration on dataset )
Let the share expired and then run the share expiration task
The expiration task should fail

Expected behavior

No response

Your project

No response

Screenshots

No response

OS

Mac

Python version

3.9

AWS data.all version

2.6

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant