Merge lp:~cprov/autopkgtest-result-checker/retry-review into lp:autopkgtest-result-checker/ubuntu-proposed-migration

Proposed by Celso Providelo
Status: Merged
Approved by: Celso Providelo
Approved revision: 17
Merged at revision: 15
Proposed branch: lp:~cprov/autopkgtest-result-checker/retry-review
Merge into: lp:autopkgtest-result-checker/ubuntu-proposed-migration
Diff against target: 48 lines (+6/-4)
2 files modified
adt_result_checker/__init__.py (+4/-4)
adt_result_checker/constants.py (+2/-0)
To merge this branch: bzr merge lp:~cprov/autopkgtest-result-checker/retry-review
Reviewer Review Type Date Requested Status
Thomi Richards (community) Approve
Martin Pitt Pending
Review via email: mp+260397@code.launchpad.net

Commit message

Stop retrying exit_code 20 (let them fail fast, as recommended by pitti).

Description of the change

Stop retrying exit_code 20 (let them fail fast, as recommended by pitti).

Right branch this time ...

To post a comment you must log in.
Revision history for this message
Martin Pitt (pitti) wrote :

I'm a bit confused by this -- instead of starting to count from 1, shouldn't this lower max_retries from 4 to 3? FWIW, if a test does not work after 3 retries it's seriously broken, so we don't want to hide that by always having to run it 4 times. So failing in that case is okay. Unless of course it's failure of nova or so -- but this would be retried in uci-nova, not the whole adt-run call.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

retry_count is set to 3, but since this component sees code after it's already run once, 3 retries == 4 runs.

I do think that we should fix this by lowering 'retry_count' in the config file though - having a count that starts at '1' is just odd IMO.

I'm fine with the other changes though.

review: Approve
16. By Celso Providelo

Reverting the retry counter change, we opted for a configuration change.

17. By Celso Providelo

Using constants.MAX_RETRIES instead of configuration [adt].max_retries. Also setting it to 2, so a job will be processed at most 3 times.

Revision history for this message
Thomi Richards (thomir-deactivatedaccount) wrote :

suhweeeeeet!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'adt_result_checker/__init__.py'
2--- adt_result_checker/__init__.py 2015-04-15 19:22:18 +0000
3+++ adt_result_checker/__init__.py 2015-05-29 03:27:54 +0000
4@@ -37,6 +37,7 @@
5 from adt_result_checker.constants import (
6 API_VERSION,
7 logging_extra,
8+ MAX_RETRIES,
9 )
10
11
12@@ -160,9 +161,8 @@
13 """
14 extra = message.payload.copy()
15 extra.update(logging_extra)
16- max_retries = int(self.config['adt']['max_retries'])
17 current_retries = int(message.payload.get('retry_count', 0))
18- if current_retries < max_retries:
19+ if current_retries < MAX_RETRIES:
20 payload_copy = message.payload.copy()
21 logger.info("Queueing for retry.", extra=extra)
22 payload_copy['retry_count'] = current_retries + 1
23@@ -232,10 +232,10 @@
24 100 Generic error happened.
25
26 This function determines which exit codes we should retry on. Currently
27- we will retry on: 16, 20, 100
28+ we will retry on: 16, 100
29
30 """
31- return exit_code in (16, 20, 100)
32+ return exit_code in (16, 100)
33
34
35 def configure_logging(config):
36
37=== modified file 'adt_result_checker/constants.py'
38--- adt_result_checker/constants.py 2015-04-15 19:05:16 +0000
39+++ adt_result_checker/constants.py 2015-05-29 03:27:54 +0000
40@@ -22,6 +22,8 @@
41
42 API_VERSION = "v1"
43
44+MAX_RETRIES = 2
45+
46 SOLUTION_NAME = "proposed-migration"
47
48 SERVICE_NAME = "adt-result-checker"

Subscribers

People subscribed via source and target branches