summaryrefslogtreecommitdiffstats
path: root/devel
AgeCommit message (Collapse)AuthorFilesLines
2012-12-27Fix "RuntimeWarning: DateTimeField received a naive datetime" warningsDan McGee1-1/+3
When running tests, we can find old migrations that didn't use datetime objects with timezones attached. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-12-04get_latest_by cleanupsDan McGee1-0/+4
Fix some that referenced non-existent attributes, and add the attribute to other models. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use python set comprehension syntax supported in 2.7Dan McGee4-6/+6
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-11-16Use Python 2.7 dictionary comprehension syntaxDan McGee2-3/+3
Rather than the old idiom of dict((k, v) for <> in <>). Signed-off-by: Dan McGee <dan@archlinux.org>
2012-10-12reporead: don't print full backtrace if unnecessaryrelease_2012-10-12Dan McGee1-3/+6
In the architecture agnostic case, this error is much more likely to happen, so printing it like an error message is deceiving. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-30Begin importing staging reposrelease_2012-09-30Dan McGee1-1/+1
This reverts 3530303c9a7d now that we have reasonably hidden most staging package confusion on the site for normal end users. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-25Only watch non-staging repos in inotify reporeadDan McGee1-1/+1
This is temporary until we do more work to ensure staging packages don't show up and confuse regular users of the web interface. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-24Exclude inactive developers in maintainer countrelease_2012-09-24Dan McGee1-1/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-24Add a new column to developer repo statsDan McGee1-0/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-20chmod -x reporead_inotify.pyDan McGee1-0/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-20Explicitly close the database connection in reporeadDan McGee1-0/+1
This is the cause of these warnings showing up in the PostgreSQL log: LOG: unexpected EOF on client connection with an open transaction All management commands are guilty of this as they do not clean up and close the connection when they exit, unlike the standard web request cycle. Other commands should probably be updated as well, but for now, this is the biggest culprit. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-17Sort package list before inserting it into the databaserelease_2012-09-18Dan McGee1-1/+4
FS#30323. This will take some time to propagate to all existing packages, but all new and updated packages will start getting filelists in the right order. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-15Add JS-based filtering to the developer reportsDan McGee1-0/+4
This can use the todolist filtering functions we made more generic in a previous commit. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-09-05Split devel forms out of devel/views.pyDan McGee2-96/+109
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-15Add ability to rematch developers on <username>@archlinux.org addressesDan McGee2-16/+38
This makes this matcher catch a bit more with the wide net we were already casting. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08Extract parse_version function from reporead logicDan McGee1-7/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-08Add flag requests to developer last action calculationDan McGee1-1/+7
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-04reporead: import make and check dependsDan McGee1-2/+5
We don't have these in the database yet, but future verisons of repo-add will put this information in the sync databases. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-08-04Make adjustments for optional -> deptype conversionDan McGee1-3/+3
Very little dealt directly with this field. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-31PGP key handling updatesDan McGee1-1/+1
* Import signatures for all known keys, not just active developers * Ensure we are only showing and accounting for active developers on the master keys page * Add a new table showing signatures between developers Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-28reporead: don't use iexact lookup on arch nameDan McGee1-3/+3
We don't do this anywhere else, so we shouldn't do this here either. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Replace deprecated direct_to_template() with render() shortcutDan McGee1-8/+7
Now that Django actually provides a concise way to use a RequestContext object without instantiating it, we can use that rather than the old function-based generic view that worked well to do the same. Additionally, these function-based generic views will be gone in Django 1.5, so might as well make the move now. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-24Remove custom utc_now() function, use django.utils.timezone.now()Dan McGee3-12/+14
This was around from the time when we handled timezones sanely and Django did not; now that we are on 1.4 we no longer need our own code to handle this. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-08Work around bulk_create limitations in sqlite3 in reporeadDan McGee1-6/+28
Given the 999 SQL statement variable limit, we can easily hit it when updating a package with thousands of files or a few hundred depends. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-08reporead: disable FULL synchronous writes for sqlite3Dan McGee1-0/+6
At least on Linux, we hit a huge bottleneck waiting for the FULL commit to happen for each added package during reporead operations. It makes much more sense to back this off to FULL level instead, which trades some possible loss of durability for speedier operation. Additionally, no one would possibly be running their production version of this site on sqlite3, right? Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-05reporead: don't append slash to empty (root) directoryDan McGee1-1/+2
Add the slash only if we have a directory name, and not otherwise. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-05reporead: handle files in root directory properlyDan McGee1-1/+4
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-05reporead: properly handle cases where last_update == files_last_updateDan McGee1-2/+2
We should assume the filelists are up to date in this case, not out of date. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-07-01Log package updates during reporead invocationDan McGee1-1/+6
This adds a Manager and log_update method to help log all updates made to the packages table during reporead runs. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-20Add a last_modified field to user profilesDan McGee2-1/+125
A behind the scenes field that might be slightly useful. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-06-07Use 3 decimal places for showing compression ratioDan McGee1-1/+1
Otherwise there are too many grouped under each value. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-19reporead: fix copy/paste issueDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-18Switch to usage of new Depend objectDan McGee2-11/+13
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-12Change to new time access methods in pgpdump codeDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-02rematch_developers: do mass updates instead of single savesDan McGee1-31/+30
When updating a lot of objects, it makes much more sense to perform targeted update queries rather than one-row-at-a-time saves. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-05-02Ensure order_by default value is cleared when using distinct()Dan McGee1-2/+4
Otherwise the queryset returns nonsensical results. I find the design of this less than obvious but so be it; we can ensure the results work regardless of a default ordering on the model. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-29Add a "last action" column to developer clocks pageDan McGee1-7/+36
This allows people to easily see if a developer has done anything recently that we can easily grab a date for. Obviously this doesn't include all sources of activity, so the list of things checked is clearly stated at the top. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-27Dev dashboard performance improvementDan McGee1-5/+10
Rather than one query per cell in the arches and repos statistics tables, we can group these together up front using Django annotations. This means we only need one query per table. In my local instance with all of the staging repos imported, this reduces the total query count on this page from 56 to 26, a rather marked improvement. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-27Incomplete-only todolists optimizationDan McGee1-2/+1
We can push this down to the database if we know in advance we only need the incomplete lists. This helps our call on the developer dashboard quite a bit; the time of the single query in question drops from >1300ms to around 40ms. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-26Add migration to auto-populate developer countries, display flagsDan McGee1-0/+157
Add a quick and dirty migration to derive country info from the developer-provided timezone, and display the flag next to the location if we have it available on the clocks and developer profiles pages. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-26Add country attribute to developer profileDan McGee2-0/+109
We can then show little flag icons later on in relevant places based off of this, such as on the developer profile, clocks page, etc. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-20UserProfile model and fields shuffleDan McGee10-18/+235
Move this model into the devel/ application, and move the PGPKeyField which is used only by these models into the application as well. This involves updating some old migrations along the way to ensure we don't reference a field class that no longer exists. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-08Change old packages report from two years to one yearDan McGee1-2/+2
Now that all packages are getting more attention, we can shorten the time period on the report to a shorter date range. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-04-07Add a mismatched signatures developer reportDan McGee2-2/+38
This finds odd signatures in our repositories, which includes signature times not matching with build dates, different signer and packager, etc. We enhance our user lookup helper class to look up users by PGP key. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-26Rename 'packagedepend_set' attribute to 'depends'Dan McGee1-1/+1
We do this for every other related package attribute, so do it here too. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23reporead: use bulk_create() for more propertiesDan McGee1-13/+17
Depends, conflicts, provides, etc. can all be done via bulk_create. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23Merge branch 'django14'Dan McGee3-44/+27
Conflicts: templates/releng/result_section.html
2012-03-23Make all datetime objects fully timezone awareDan McGee2-24/+21
This is most of the transition to Django 1.4 `USE_TZ = True`. We need to ensure we don't mix aware and non-aware datetime objects when dealing with datetimes in the code. Add a utc_now() helper method that we can use most places, and ensure there is always a timezone attached when necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23Change Django urls.py importDan McGee1-1/+1
Until Django 1.3, the functions include(), patterns() and url() plus handler404, handler500 were located in a django.conf.urls.defaults module. In Django 1.4, they live in django.conf.urls. Signed-off-by: Dan McGee <dan@archlinux.org>
2012-03-23reporead: use Django 1.4 bulk_create() for package filesDan McGee1-4/+3
Signed-off-by: Dan McGee <dan@archlinux.org>