Closed Bug 630633 Opened 13 years ago Closed 10 years ago

Option to rebuild N times with self-serve

Categories

(Release Engineering :: General, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: catlee, Assigned: catlee)

Details

(Keywords: buildapi, sheriffing-P2)

Attachments

(2 files)

It would be really useful to be able to rebuild something a certain number of times, waiting for the job to start each time before triggering another job.
OS: Linux → All
Priority: -- → P5
Hardware: x86_64 → All
Whiteboard: [self-serve] → [self-serve][automation]
Keywords: buildapi
Whiteboard: [self-serve][automation]
Keywords: sheriffing-P2
Product: mozilla.org → Release Engineering
<ehsan> catlee: can I bribe someone to fix that please? :)
<edmorley> it's something that would save me time too fwiw
<ehsan> catlee: or can you tell me how to fix it if it's easy?
<catlee> http://hg.mozilla.org/build/buildapi/file/7b75f9e93580/buildapi/controllers/selfserve.py#l372 (and the method below) need to look for a 'n_retries' parameter
<catlee> http://hg.mozilla.org/build/buildapi/file/7b75f9e93580/buildapi/scripts/selfserve-agent.py#l289 needs to act on it
<ehsan> catlee: how does one test this stuff locally?
<catlee> and then probably some UI changes unless you like hitting the API directly
Assignee: nobody → catlee
gently tested...but what could go wrong?
Attachment #8410989 - Flags: review?(dustin)
Comment on attachment 8410989 [details] [diff] [review]
retries-buildapi.patch

Review of attachment 8410989 [details] [diff] [review]:
-----------------------------------------------------------------

with the described change

::: buildapi/controllers/selfserve.py
@@ +390,5 @@
>          except formencode.Invalid:
>              return self._failed('Bad priority', 400)
>  
> +        try:
> +            count = validators.Int(if_empty=0).to_python(request.POST.get('count'))

Shouldn't this be `if_empty=1`?  I see that it defaults to 1 on the agent if missing, but the docstring describes a default for the POST.

@@ +426,5 @@
>          except formencode.Invalid:
>              return self._failed('Bad priority', 400)
>  
> +        try:
> +            count = validators.Int(if_empty=0).to_python(request.POST.get('count'))

ditto
Attachment #8410989 - Flags: review?(dustin) → review+
Comment on attachment 8410989 [details] [diff] [review]
retries-buildapi.patch

Fixed the default count if not submitted; also fixed the fields submitted for rebuilding requests.
Attachment #8410989 - Flags: checked-in+
Attachment #8412102 - Flags: review?(dustin)
Attachment #8412102 - Flags: review?(dustin) → review+
Comment on attachment 8412102 [details] [diff] [review]
deploy new version of agent

and merged to production
Attachment #8412102 - Flags: checked-in+
Looks like this is live!

Give it a spin!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Thanks *so much* Chris!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: