Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#1483 closed change (fixed)

sitescripts.extensions.utils.getDownloadLinks() shouldn't fail completely for issues in one repository

Reported by: trev Assignee: jsonesen
Priority: P2 Milestone:
Module: Sitescripts Keywords:
Cc: sebastian, jsonesen Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by trev)

Background

sitescripts.extensions.web.downloads stopped updating its links recently, I had to restart the process. Recently there were issues connecting to AMO servers, and it seems that the resulting exception killed the update thread.

What to change

sitescripts.extensions.utils.getDownloadLinks() should never fail - if one repository has issues, it should print the exception but continue with the next repository.

Change History (12)

comment:1 Changed 5 years ago by sebastian

  • Component changed from Infrastructure to Sitescripts

comment:2 Changed 4 years ago by sebastian

  • Cc sebastian added
  • Priority changed from P1 to P2

comment:3 Changed 3 years ago by andrey

Where should it print? STDERR?

comment:4 Changed 3 years ago by trev

  • Tester set to Unknown

Yes, just use logging module.

comment:5 follow-up: Changed 3 years ago by sebastian

It seems the current code in the updater thread already catches all exceptions:

try:
    links = _get_links()
except:
    traceback.print_exc()

(Though, it wouldn't continue with the next repo if an error occurs. But simply retries all repos after 10 minutes.)

comment:6 in reply to: ↑ 5 Changed 3 years ago by trev

Replying to sebastian:

(Though, it wouldn't continue with the next repo if an error occurs. But simply retries all repos after 10 minutes.)

That's still a problem - if one repo has persistent errors others will never update.

However, my initial assessment of the issue is probably incorrect, the exception catching code was there all along.

comment:7 Changed 3 years ago by sebastian

  • Ready unset

No objections to change the code that it continues with the next repo if one fails. However, if you had to restart the process last time, to make it work again, that was a different issue. And with the given information, I have no idea what might have caused it. Anyway, feel free to update the issue description.

comment:8 Changed 3 years ago by jsonesen

Is this someone working on this? Otherwise I am happy to do so.

comment:9 Changed 3 years ago by trev

  • Description modified (diff)
  • Ready set
  • Summary changed from sitescripts.extensions.utils.getDownloadLinks() should never fail to sitescripts.extensions.utils.getDownloadLinks() shouldn't fail completely for issues in one repository

Feel free to. I changed the description, now this is about error handling - if we have persistent errors affecting one repository, it shouldn't have any effect on others.

comment:10 Changed 3 years ago by jsonesen

  • Cc jsonesen added
  • Owner set to jsonesen

comment:11 Changed 3 years ago by jsonesen

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.