-
Notifications
You must be signed in to change notification settings - Fork 15
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
Hackathon #51
Hackathon #51
Conversation
Request are now fully parallel (with the exception of paginablejson with more than one page). Big architecture issue but hopefully do not appear to often On Genymotion, with 80 repos and 23 open PR Before: 19s After: 9s Also add a --beat option to celeryd that is supposed to purge the sqlite file regulary. It is possible than we can improve the perf using something else than sqlite. It seems that all the jobs cannot really be launched simustaneously.
I did not succeed to have a background task (delay) that can wait for other (parallel) subtask to complete. It seems that calling get() inside a background task is forbidden. For now, the slack bot will be synchroneous, this mean the user will not see a message until the processing is complete. This also means that we keep the connexion between slack and us open during all this time (10-15s) but apparently slack do not cut it.
In order to improve the visibility on Slack only show the KO keyword is there is an actual KO on the PR. Do not show the KO count because one is enough to block the PR.
Everything is in DB now. Still need some work to cleanup things: * db model is too complex (need to link everything to a "general configuration") * some settings should not be mandatory or have default (feedback) * slack bot is dead (again) * code become more and more nasty
|
||
return req | ||
|
||
#FIXME initital migration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The solution for the FIXME is here: https://github.com/Genymobile/gm_pr/blob/hackathon-carmen-merge/web/__init__.py
top_level_url = models.CharField(max_length=256, default=settings.TOP_LEVEL_URL) | ||
old_period = models.IntegerField(default=4, null=True, blank=True) | ||
slack_settings = models.ForeignKey(SlackSettings, null=True, blank=True) | ||
#label_github = models.ManyToManyField(LabelGithub, default=None, blank=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these assignments for label_github and feedback_github comented out? If it's about a warning when starting up the server, this was fixed here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The link is now in the other way
class LabelGithub(models.Model):
general_settings = models.ManyToManyField(GeneralSettings, blank=True)
(like for project)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Maybe these commented-out lines could be removed now?
@@ -32,3 +33,5 @@ def __init__(self, url="", title="", updated_at="", user="", | |||
self.milestone = milestone | |||
self.labels = labels | |||
self.is_old = is_old | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only whitespace changes in this file. Maybe revert the changes to prevent conflicts when merging.
|
if request.GET != None and 'token' in request.GET \ | ||
and request.GET['token'] == settings.SLACK_TOKEN: | ||
and general_settings and request.GET['token'] == general_settings.slack_settings.slack_token: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about not returning a 403 when general_settings
doesn't exist? I think 5xx should be more appropriate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this is related to this issue: #6
I think we can kill this now |
This branch assemble the work from the last hackathon:
Sorry, @caarmen with the refacto of HTTP request to speed up things, I could'nt easily merge your work. I'll probably do it later.
Anyway this branch is a good basis but need some work to have something mergeable.
Some of known issues: