Merge ~cjwatson/launchpad:more-relative-build-scores into launchpad:master

Proposed by Colin Watson
Status: Needs review
Proposed branch: ~cjwatson/launchpad:more-relative-build-scores
Merge into: launchpad:master
Diff against target: 823 lines (+346/-32)
21 files modified
lib/lp/charms/browser/charmrecipe.py (+5/-1)
lib/lp/charms/browser/tests/test_charmrecipe.py (+4/-1)
lib/lp/charms/interfaces/charmrecipe.py (+12/-0)
lib/lp/charms/model/charmrecipe.py (+15/-0)
lib/lp/charms/model/charmrecipebuild.py (+1/-3)
lib/lp/charms/tests/test_charmrecipe.py (+11/-0)
lib/lp/code/browser/configure.zcml (+6/-6)
lib/lp/code/browser/gitrepository.py (+17/-10)
lib/lp/code/browser/tests/test_gitrepository.py (+9/-6)
lib/lp/code/interfaces/gitrepository.py (+12/-0)
lib/lp/code/model/cibuild.py (+1/-1)
lib/lp/code/model/gitrepository.py (+15/-0)
lib/lp/code/model/tests/test_cibuild.py (+13/-0)
lib/lp/scripts/garbo.py (+87/-0)
lib/lp/scripts/tests/test_garbo.py (+96/-0)
lib/lp/snappy/browser/snap.py (+2/-0)
lib/lp/snappy/browser/tests/test_snap.py (+5/-1)
lib/lp/snappy/interfaces/snap.py (+12/-0)
lib/lp/snappy/model/snap.py (+15/-0)
lib/lp/snappy/model/snapbuild.py (+5/-1)
lib/lp/snappy/tests/test_snap.py (+3/-2)
Reviewer Review Type Date Requested Status
Clinton Fung Approve
Review via email: mp+437038@code.qastaging.launchpad.net

Commit message

Add relative_build_score to CharmRecipe/GitRepository/Snap

Description of the change

This lets us adjust the priority of all builds for a given recipe or repository, which is occasionally useful.

The new attributes are currently only editable by commercial admins and people with similar privilege, which isn't perfect; ideally these would also be editable by Launchpad staff, since they don't allow privilege escalation. However, that would have involved a fair bit more rearrangement (particularly in `GitRepository`, where the `launchpad.Moderate` permission is already in use for something else), and I wanted to get this out the door without blocking on that.

To post a comment you must log in.
Revision history for this message
Clinton Fung (clinton-fung) wrote :

I would want to refactor things like the "Hard-code score" of 2510 (and others, especially where there is implicit arithmetic done) to not be a magic number.

It may not be for this specific merge, but it's something that I can see being a good idea as people start to need to be able to reason about what order things will run in given certain build scores.

review: Approve

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: