Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on buckets containing dots #139

Open
stevage opened this issue Apr 3, 2019 · 4 comments
Open

Fails on buckets containing dots #139

stevage opened this issue Apr 3, 2019 · 4 comments

Comments

@stevage
Copy link
Contributor

stevage commented Apr 3, 2019

For me, it seems I can successfully upload to buckets that don't contain dots in the name. Otherwise it fails:

$ mapbox-tile-copy ../subways.mbtiles 's3://very-temporary/subways/{z}/{x}/{y}.pbf'
13 tiles @ 13/s, 30% complete [0s]
44 tiles @ 44/s, 100% complete [0s]
44 tiles @ 44/s, 100% complete [0s]

$ mapbox-tile-copy ../subways.mbtiles 's3://very.temp.test/subways/{z}/{x}/{y}.pbf'
13 tiles @ 13/s, 30% complete [0s]
36 tiles @ 36/s, 82% complete [0s]
44 tiles @ 44/s, 100% complete [0s]
Tile does not exist

This is obviously a big problem for serving tiles from S3 as a static website.

This is basically a duplicate of #53, which was apparently fixed by a third-party library update, but...it's now back?

@stevage
Copy link
Contributor Author

stevage commented Apr 3, 2019

Hmm, I think I somehow had an old version of this installed. Running on latest works now.

@stevage stevage closed this as completed Apr 3, 2019
@stevage stevage reopened this Apr 3, 2019
@stevage
Copy link
Contributor Author

stevage commented Apr 3, 2019

Ok, after a lot of painful investigation, I have discovered that there is an issue.

mapbox-tile-copy uses s3urls version 1.5.3 which fixed the dot issue.

But mapbox-tile-copy uses tilelive-s3 version 6.5.1 which uses s3urls^1.4.0 which in my case seems to mean that I got two versions of s3urls installed. tilelive-s3's version is what calculates the bucket name, so it gets it wrong.

Ohhh...I think it's because @mapbox/tilelive-s3 uses s3urls instead of @mapbox/s3urls.

@stevage
Copy link
Contributor Author

stevage commented Apr 3, 2019

Wow. The fix, after all that seems to be straightforward: just upgrade @mapbox/tilelive-s3 to 7.0.1. Although I haven't run the tests, so it's possible that breaks other things.

@rogsmith
Copy link

I ran into the same issue, and have decided to push to URL without dots and will migrate to proper s3 bucket afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants