-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Remove possibility for shared state in PublicTasks and friends #3974
Comments
I only see that we use And we use that here Not sure if we depend on this code in other parts (like on the .com site), Also, I couldn't find any other based class tasks. |
Yeah, so this probably needs to be broken out into a stateful object instead of inside the task. As far as i can remember, we only use the public task during remote repository syncing. I think we had planned on using it for build triggering, so we could update the status on the build list/output pages, but never got there. |
So, we access the request object inside the class, we can't do something like #3946 (or at least I think so 😬). So, I thinking in using a bound task http://docs.celeryproject.org/en/latest/userguide/tasks.html#bound-tasks |
So, I was exploring this, I found that the same class (instance) is shared (same id), but the self.request object is different. I tested this creating two social applications and two users (one with GitHub and another with Gitlab) and using Anyway, we can add this to #3973 and be 100% sure. |
Similar to the changes in #3946, we should break out the task steps to a
separate class to encapsulate state. Tests first will help determine if this is
prone to the same problem as the project.task Task subclasses.
The text was updated successfully, but these errors were encountered: