mapbox / preprocessorcerer

Perform preprocessorcery and pick parts on particularly persnickity uploads
ISC License
12 stars 8 forks source link

Archive original KML/GPX files #75

Closed who8mycakes closed 7 years ago

who8mycakes commented 7 years ago

This PR adds steps to retain/archive the original KML or GPX file uploaded by a user.

Additionally, I added tests which assert:

@GretaCB Two questions I have are:

cc @mapbox/unpacker

GretaCB commented 7 years ago

Should a random string of integers be added to the archive.* filename to differentiate between multiple archived files, or are individual outdirectories created per upload?

No need in this case, since each upload is its own separate job on the EC2. Even if more jobs were being run on the EC2 at a time, the dirname created is randomized.

who8mycakes commented 7 years ago

@GretaCB Got the control flow issue sorted by nesting the functions:

I attempted to test this on staging today, however, testing was unsuccessful due to the lack of some environment credentials. I will take another stab at it tomorrow.

who8mycakes commented 7 years ago

I was able to test this branch with the related bundle-fairy PR (https://github.com/mapbox/bundle-fairy/pull/9), and individual kml and gpx uploads were 🍏 , and the resulting zipped bundle included an archived file. I will run through some invalid bundles, kml, and gpx file test cases tomorrow.

who8mycakes commented 7 years ago

@mapsam Can you please take a look here before I start finishing steps?