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

Race condition occurs when adding folder to shared items in shares and errors out #388

Closed
manjulaK opened this issue Mar 29, 2023 · 2 comments · Fixed by #392
Closed

Race condition occurs when adding folder to shared items in shares and errors out #388

manjulaK opened this issue Mar 29, 2023 · 2 comments · Fixed by #392
Labels
priority: high status: in-review This issue has been implemented and is currently in review and waiting for next release type: bug Something isn't working

Comments

@manjulaK
Copy link
Contributor

Describe the bug

There is an error happening when Folder is added to share item and submit approval. The sharing of folder errors out , @noah-paige suggested that there is an easy fix to this. Please fix .

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.*

Expected behavior

No error happens when folder is added to shared items and submit approval .

Your project

No response

Screenshots

No response

OS

all

Python version

3.1

AWS data.all version

1.4.2

Additional context

No response

@dlpzx
Copy link
Contributor

dlpzx commented Mar 29, 2023

Thanks for raising the issue! I checked the logs that you sent me externally and for reference the issue is that when we share a folder:

  1. we grant permissions to the IAM role of the requester to access the access point
  2. we create the access point
  3. we create the access point policy

The issue is that the creation of the access point takes some time and when it tries to attach a policy to it is fails. In the initial implementation there was a wait 5 seconds after the creation, but it seems to not be enough. Instead I have added a while loop (check the branch of this issue) and I am testing it

@dlpzx
Copy link
Contributor

dlpzx commented Mar 30, 2023

@manjulaK It is solved in the linked PR :)

@dlpzx dlpzx added type: bug Something isn't working status: in-review This issue has been implemented and is currently in review and waiting for next release priority: high labels Mar 30, 2023
dlpzx added a commit that referenced this issue Mar 30, 2023
…s and errors out (#392)

### Feature or Bugfix
- Bugfix

### Detail
- The creation of S3 access points is asynchronous and can take more
than 5 seconds to complete. When the share managers tries attaching the
policy to the access points it fails in certain cases. This PR replaces
the waiting time of 5 seconds for a while loop that checks that the
access points has been created and if not it waits for 30s

### Relates
- #388 

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: high status: in-review This issue has been implemented and is currently in review and waiting for next release type: bug Something isn't working
Projects
None yet
2 participants