Closed Bug 1120973 Opened 9 years ago Closed 6 years ago

crashstorage classes alter datetimes to suit themselves and break other crashstores

Categories

(Socorro :: Backend, task)

x86_64
Linux
task
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: lars, Unassigned)

References

Details

the boto crashstorage class stringifies the datetimes within the raw & processed crashes to suit itself.  The format that it uses is not necessarily compatible with other crashstores.  Either unify the required format OR make sure that the crashstores that want to alter the crash use a copy-on-write mechanism.
We use this trick in the webapp E.g. https://github.com/mozilla/socorro/blob/2a062cd579fc5a47e24337c1846ee7003736ffce/webapp-django/crashstats/crashstats/utils.py#L67

I generally don't like it because it's a bit of magic. However, the `datetime.datetime.isoformat()` thing is the best possible way to send dates. Decimals, not such a simple story. 

Ideally one should avoid these tricks and keep it simple so that it's not left to magic.
I don't think Socorro boto crashstorage does this anymore. If it does, I'm hard-pressed to find the problematic code.

A while back, we got tired of crashstorage destinations that changed crash data and adjusted the code to copy the data before passing it to the crashstorage. I'm pretty sure the only problematic crashstorage destination at the time was Elasticsearch.

Anyhow, I don't think this is a problem anymore, so I'm going to mark it WORKSFORME.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.