Closed Bug 1247286 Opened 8 years ago Closed 8 years ago

add retry logic to config_seta.py

Categories

(Infrastructure & Operations Graveyard :: CIDuty, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: kmoir, Assigned: kmoir)

References

Details

Attachments

(1 file, 1 obsolete file)

in case seta server in intermittently unavailable
Assignee: nobody → kmoir
Attached patch bug247286.patch (obsolete) — Splinter Review
Attachment #8717943 - Flags: review?(bugspam.Callek)
Attachment #8717943 - Flags: review?(bugspam.Callek)
Attached patch bug247286.patchSplinter Review
Attachment #8717943 - Attachment is obsolete: true
Attachment #8717960 - Flags: review?(bugspam.Callek)
Comment on attachment 8717960 [details] [diff] [review]
bug247286.patch

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

::: mozilla-tests/config_seta.py
@@ +57,5 @@
> +        if retries < 1:
> +            raise Exception("Could not fetch url '%s'" % url)
> +        retries -= 1
> +        print("Retrying")
> +        time.sleep(60)

I've never been a big fan of `while True` in code thats not meant to live forever. Too easy to accidentally break the assumptioned logic at some point.

That said, I'm not going to r- for it since this is relatively clean code and leave it up to you.

@@ +71,1 @@
>      data = json.loads(response.read())

I'm more likely to have wanted the retry logic out here, due to possible cases of severed pipe/abnormal socket termination that merely causes invalid json and not the innability to read SETA. But either way this is an improvement I'm happy to take.
Attachment #8717960 - Flags: review?(bugspam.Callek) → review+
Attachment #8717960 - Flags: checked-in+
in production
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
See Also: → 1259325
Component: Platform Support → Buildduty
Product: Release Engineering → Infrastructure & Operations
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: