stephenyeargin / hubot-grafana

📈🤖 Query Grafana dashboards
http://docs.grafana.org/tutorials/hubot_howto/
MIT License
154 stars 48 forks source link

S3 Region breaks existing setup #154

Closed KeesCBakker closed 1 year ago

KeesCBakker commented 1 year ago

Describe the bug Looks like the S3 region breaks existing image.

Older version (3.2.2) returns URLs like this: https://snap.s3.amazonaws.com/graph/e0fae61eaba8bbb0494e7d45066f02801d3a3b84.png The latest version (4.0.0) return URLs like this: https://snap.eu-west-1.s3.amazonaws.com/graph/e0fae61eaba8bbb0494e7d45066f02801d3a3b84.png

Looks like my existing bucket does not support the eu-west-1 part. Now if I remove that part, the file shows.

Think it is related to this region: image

To Reproduce N/A

Expected behavior I expect the existing code to work. But I'm happy to upgrade something else.

Screenshots This this code is the problem: image

Software:

Additional context N/A

KeesCBakker commented 1 year ago

Looks like the problem is due to the region being rendered before the s3. part and it should come after it. As per docs: https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html#virtual-host-style-url-ex. Made a PR to fix this.

stephenyeargin commented 1 year ago

Fixed with #155