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

Remove possibility for shared state in PublicTasks and friends #3974

Closed
agjohnson opened this issue Apr 19, 2018 · 4 comments
Closed

Remove possibility for shared state in PublicTasks and friends #3974

agjohnson opened this issue Apr 19, 2018 · 4 comments
Labels
Accepted Accepted issue on our roadmap
Milestone

Comments

@agjohnson
Copy link
Contributor

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.

@agjohnson agjohnson added this to the 2.4 milestone Apr 19, 2018
@agjohnson agjohnson modified the milestones: 2.4, 2.5, 2.6 May 31, 2018
@agjohnson agjohnson added the Accepted Accepted issue on our roadmap label Jun 8, 2018
@agjohnson agjohnson modified the milestones: 2.6, 2.7 Jul 17, 2018
@stsewd
Copy link
Member

stsewd commented Sep 19, 2018

@agjohnson
Copy link
Contributor Author

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.

@stsewd
Copy link
Member

stsewd commented Sep 19, 2018

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

@stsewd
Copy link
Member

stsewd commented Sep 19, 2018

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 rdb. Maybe the request object isn't shared here? or I dit test this wrong?

Anyway, we can add this to #3973 and be 100% sure.

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

No branches or pull requests

2 participants