mozilla / fxa-activity-metrics

A server for managing the Firefox Accounts metrics database and pipeline
1 stars 3 forks source link

Traceback from importing email events #77

Closed rfk closed 7 years ago

rfk commented 7 years ago

I see this in the mail spool on our redshift helper box:

./build/bin/python ./import_email_events.py
FINDING UNPOPULATED DAYS FROM 2017-04-30
Traceback (most recent call last):
  File "./import_email_events.py", line 24, in <module>
    id_column="flow_id")
  File "/home/ec2-user/fxa-activity-metrics/import_events.py", line 229, in run
    if max_extant_day > unpopulated_days[0]:
IndexError: list index out of range
make: *** [import] Error 1
make: Leaving directory `/home/ec2-user/fxa-activity-metrics'

I recently did a manual import of email events that got killed partway through, which may or may not have put the db in a state that's started causing this to fail.

philbooth commented 7 years ago

Fwiw, the script is easily tweaked so that it can fill in holes caused by incomplete runs: in the calling script, just set the day_from argument to import_events.run to the CSV date you want to start from.

The stack trace here is what happens whenever it thinks there are no unpopulated days, so it will naturally go away when the next CSV is available. But that doesn't mean it will fill in the holes, unless day_from is explicitly set.

rfk commented 7 years ago

AFAIK these are importing correctly, closing this out