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

Hackathon #51

Closed
wants to merge 11 commits into from
Closed

Hackathon #51

wants to merge 11 commits into from

Conversation

CedricCabessa
Copy link
Contributor

This branch assemble the work from the last hackathon:

  • More speed
  • A backend

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:

  • slackbot is broken
  • backend schema is too complicated, which make admin page difficult to use
  • some database ugliness have leaked in the HTTP request engine

CedricCabessa and others added 9 commits August 23, 2015 09:38
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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)
Copy link

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:

2ca968f

Copy link
Contributor Author

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)

Copy link

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

Copy link

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.

@sgaland
Copy link
Contributor

sgaland commented Aug 24, 2015

slackbot is broken ? ❌

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:
Copy link
Contributor

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.

Copy link

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

@CedricCabessa
Copy link
Contributor Author

I think we can kill this now

@CedricCabessa CedricCabessa deleted the hackathon branch February 18, 2016 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants